.NET 9 Process.Start crash due to CETCompat
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- csharp
- Domain
- desktop, operating-systems
Research direction
Start with the provided ProcessStartInfo and Process.Start reproduction on Windows, comparing .NET 9 with .NET 8 and CETCompat enabled versus disabled. Investigate the ntd.dll 0xc0000409 crash when Verb="runas" is used; done means the regression is reproduced and the crash is fixed or its cause and supported workaround are documented.
Written by the indexing model from the issue text.
Description
Description
Note - I am not sure if this intended, opening just in case it's not.
Starting a Process as admin seems to crash on ntd.dll 0xc0000409 due to the CET support introduced in .NET 9.
Reproduction Steps
For some reason this does not reproduce in all PCs, I couldn't find any pattern to why.
In my case it happens to users of my app when they try to open executable files as admin.
It's done by starting a Process with Verb="runas".
var processStartInfo = new ProcessStartInfo(filePath)
{
UseShellExecute = true,
Arguments = args,
WorkingDirectory = Path.GetDirectoryName(filePath)!
};
var process = new Process
{
StartInfo = processStartInfo
};
processStartInfo.Verb = "runas";
process.Start();
Expected behavior
The .NET process to not crash.
Actual behavior
The .NET process crashes with ntd.dll 0xc0000409, no stack trace.
Regression?
This was not an issue in .NET 8.
Known Workarounds
Use <CETCompat>false</CETCompat> solves the issue.
Configuration
No response
Other information
No response
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/runtime
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
area-System.Reflection blocking-clean-ci-optional Known Build Error os-mac-os-x untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
area-CodeGen-coreclr untriaged
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
agentic-workflows untriaged
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
area-VM-meta-mono untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·
-
area/docs-content Bug pulumi/docs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
-
Create parent directories only after the containment check in InstallHelper.TryExtractToDirectory Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PowerShell/PSResourceGet#2056 ·