Repository navigation
Replies: 1 comment
|
The reproduction harness is now published as a runnable repo, so the matrix above can be re-run on any Windows host: https://github.com/yzyyohh/dsh-windows-sandbox-0xc0000142 It drives Note for anyone running it: |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
Under
workspace-write, a confinedpowershell.execannot launch a native child when thatchild's stdout/stderr are piped. The spawn fails with
Access is denied(Win32ERROR_ACCESS_DENIED/EPERM), and Windows additionally raises a hard-error dialog onthe user's desktop:
python.exe - Application Error : 应用程序无法正常启动(0xc0000142).This is a user-visible symptom, not just a tool-level error: the dialog is a loader hard
error, so it cannot be suppressed by the harness, by WER settings, or by error mode.
Environment
@deepseek-ai/dsh0.1.5-rc.2@deepseek-ai/dsh-sandbox-windows-acl0.1.5-rc.2@deepseek-ai/dsh-win32-process0.1.5-rc.2C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe(Windows PowerShell 5.1)workspace-writeAlso reproduced against
@deepseek-ai/dsh-win32-process@0.1.6-alpha.1and against thecurrent
mastersource line — neither contains a change for this path(
STARTF_USESTDHANDLESis still the onlydwFlagsbit set).Reproduction A — through the harness
With a session in
workspace-write, using thepwshtool:The failing form also writes System event log
Application Popupid 26:Switching the same session to
danger-full-accessand re-running the identical capturedcommand succeeds 3/3 with zero popups. The only variable is the confined shell.
Over a 30-day window this host produced 141 such popups, across nine different
executables —
node.exe(47),python.exe(34),git.exe(11),cmd.exe(11),where.exe(11),curl.exe(3),dotnet.exe(1),pdftoppm.exe(1),HOSTNAME.EXE(1).None of the affected programs is broken; each runs correctly outside the sandbox.
Reproduction B — direct
AclSandboxAPI (no harness in the loop)AclSandbox(workspace-write) is used to spawn a confinedpowershell.exe, and thecase only varies what that confined shell does with a native child. This isolates the
failure from any harness/tool-layer behaviour.
Write-Output CMDLET_OK0x00000000CMDLET_OK& python.exe -V | Out-String0x00000001Access is denied+ desktop popup0xC0000142& python.exe -V > py_out.txt; Get-Content py_out.txt0x00000000cmd.exe /c "echo FROM_CMD" | Out-String0x00000001Access is deniedThe matrix is deterministic — repeated runs give the same result. The discriminator is
piped stdio vs. file-redirected stdio, not the executable, not the console, and not the
host's console state:
console-less-host boundary described in [Bug] Windows: sandboxed pwsh always dies with 0xC0000142 under console-less host (desktop launch path) #810.
Probe harness (two files, ~110 lines) is available on request; it calls the shipped
AclSandboxexactly as the executor does:Documentation conflict
@deepseek-ai/dsh-sandbox-windows-acl/README.md→ Known Limitations currently states:The last clause does not hold here: a PowerShell pipeline is precisely what fails in cases 2
and 4. Either the default-DACL assumption is OS/build-dependent, or the guarantee is narrower
than documented. The entry also omits that the failure escalates to a desktop hard-error
dialog, which is the part users actually report.
Things I tested that do not fix it
STARTF_USESHOWWINDOW | SW_HIDEon the sandboxSTARTUPINFO(the fix proposed in #1344,dwFlags: 256 → 257)Access is denied, still the popupSetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX)set before the spawn (inherited by the confined subtree)HKCU\...\Windows Error Reporting\DontShowUI=1(reported in #1847)dsh webdanger-full-accessWhat I am asking for
clarification) of the "anonymous pipes work" statement in the backend README.
setting an explicit default DACL on the duplicated
WRITE_RESTRICTEDtoken — or whetherthis is accepted as a hard boundary.
a tool-level error. Even when the spawn cannot succeed, an agent host should not be able
to put a modal loader error box on the user's screen; a way to force the diagnostic-only
path would be worth having on its own.
Related existing reports
sandboxed pwsh always dies with 0xC0000142 under console-less hostSandboxed subprocess spawn flashes a visible console window from GUI hosts; STARTF_USESHOWWINDOW + SW_HIDE fixes it without the 0xC0000142 crashWorkspace-write sandbox: external processes fail with 0xC0000142 on Windows 10 (build 19041)— closest match: same dialog text, same executable set, plus the "works early in the session, then fails persistently" timingWindows PTC/Code Mode (run_code) cannot spawn any subprocess — bash/glob/grep fail with 0xC0000142This report adds what those threads lack: a controlled matrix that isolates piped stdio as
the discriminator, on a host where the confined shell itself starts normally.
Appendix — the ~110-line probe harness used for Reproduction B
All reactions