Repository navigation
Sandbox unusable on Win11 build 26200: runtime LoadLibraryExW denied under restricted token (E_ACCESSDENIED 0x80070005) #9471
Replies: 1 comment
|
Thanks for the controlled matrix — the split "processes that only load image dependencies at startup survive, runtime loaders all die" is what makes this report usable, and the host-swap control in the follow-ups is what turned it from a curiosity into a reproduce-the-cause claim. Two source-side notes and one pointer. 1. On your two documentation points. Your reading is fair. Both places state a single-machine verification at build granularity: 2. This is not the family our advisor recognizes, and I want to be exact about why. 3. The silent-isolation observation is the one I would file on its own — it is a different failure mode, and it is diagnosable today. When Your workaround ( |
Uh oh!
There was an error while loading. Please reload this page.
TL;DR
@deepseek-ai/dsh-sandbox-windows-aclappears unusable on Windows 11 build 10.0.26200. Any child process spawned under the ACL restricted token dies at runtime library load withE_ACCESSDENIED (0x80070005):cmd.exe,icacls.exe);pwsh->hostfxr.dll, Windows PowerShell 5.1 -> CLR init,node-> CNG).Consequences on this machine: the pwsh terminal tool cannot start at all (surfaces as
PTY shell exited during startup), and every sandboxed one-shot bash/node/python call fails too. In-process file tools still work, which made this hard to spot.I ran a controlled experiment matrix - 8 variables (ConPTY vs plain pipes, integrity level, token flags 8/9/12/13, token default DACL, restricting SID list,
icacls /resetafter robocopying the tree, target location, transport method). None of them change the outcome, which points at a kernel-level rule rather than any policy knob.Full report attached (DIAGNOSIS.md); the re-runnable drivers are
matrix.js,variant.jsandpty-driver.js.Two specific things worth a look:
dsh-sandbox-windows-acl/README.mdline 189 - the "objects another AppContainer-based tool has ACL'd with a package SID" exception appears wider than documented on this machine: it reaches ordinaryProgram Filesand user directories, and clearing ACEs withicacls /resetdoes not lift it.createRestrictedTokeninacl-types.jsclaims this design was "verified on Win11 26200". Here the keep-alive group is verifiably in place, the build is 26200, and runtime DLL init plus CNG still fail.I cannot localize the responsible kernel rule from userspace (needs a kernel debugger or ETW), but for affected users the outcome is the same: the sandbox cannot be used.
中文摘要
Windows 11 build 10.0.26200 上,被
@deepseek-ai/dsh-sandbox-windows-acl的受限令牌启动的子进程无法在运行期加载库:LoadLibraryExW返回E_ACCESSDENIED (0x80070005)。cmd.exe/icacls.exe(只在启动期加载映像依赖)正常;pwsh/ Windows PowerShell 5.1 /node(需要运行期加载托管运行时或 CNG)全部失败;后果:该沙箱在本机完全不可用,任何被它包装的子进程都起不来(终端工具直接不可用)。
Environment
@deepseek-ai/dsh-sandbox-windows-acl@deepseek-ai/dsh-terminal-bash@deepseek-ai/dsh-subprocess-localnode-ptySymptom
Any sandboxed
pwshinvocation dies during startup. Exact stderr:At the tool layer this surfaces as
PTY shell exited during startup(terminal-bash.js:waitReason === "session_exit"), which is misleading - the PTY itself is fine.Minimal reproduction
On build 26200, launch a child process under the ACL restricted token this package uses (token flags
13, keep-alive restricting group[logon SID, Everyone]), then have it callLoadLibraryExWat runtime:cmd.exe,icacls.exesurvive)E_ACCESSDENIED (0x80070005)Additional failures observed, same root cause:
pwshhostfxr.dllload denied,exit = 0x80008082exit = 0xffff0000nodeRuled out (all measured on this machine; no effect on the outcome)
cmd.exeinside ConPTY0- so this is not a PTY/handoff problemBUILTIN\Usersrobocopythe whole PowerShell tree to a user directory +icacls /reset(clearing package-SID ACEs)Every policy-level knob was varied without effect, so the denial appears to come from a kernel-level rule specific to this machine - consistent with the class your README already flags as unconfirmed.
Blast radius
Not limited to terminals. Any child process spawned under this sandbox that loads libraries at runtime fails: sandboxed pwsh terminals, plus one-shot bash/node/python calls routed through
ctx.sandboxPolicy. In-process file tools (which spawn no children) still appear to work, which made this hard to spot.Two documentation / assumption points worth a look
1.
dsh-sandbox-windows-acl/README.mdline 189 (the "objects another AppContainer-based tool has ACL'd with a package SID ... the kernel rule is unconfirmed" entry). Here the effect is wider than described: it reaches ordinaryProgram Filesand user directories, and clearing ACEs withicacls /resetdoes not lift it.2. The source comment above
createRestrictedTokeninacl-types.jsclaims the keep-alive group design was "verified on Win11 26200":That premise does not hold here. The keep-alive group was verifiably in place (
workspace-write=[logonSid, Everyone, workspaceSid, tempSid], checked item by item against source), the build is 26200, and runtime DLL init plus CNG still fail.Honest boundary
I can prove this is none of the configurable knobs listed above. I cannot localize which kernel rule is responsible from userspace - that needs a kernel debugger or ETW tracing. For affected users the distinction does not change the outcome: the sandbox is unusable on such a machine.
Workaround we used
Ran the profile with
danger-full-access, which bypasses the provider entirely (spawnArgv:if (policy.mode === "danger-full-access") return argv).Related observation worth a separate look:
sandbox-policy.modeandapproval.policymust be changed as a pair. Changing onlysandbox-policy.modecomposes{danger-full-access, ask}, which matches no preset, sodsh-permission-presetsthrows and Cordis then silently isolates the plugin - no/permissioncommand, no composer permission control, and no log line anywhere. That failure mode is very hard to diagnose.Attachments
DIAGNOSIS.md- full report: error text, experiment matrix, timeline, exact commandsmatrix.js,variant.js- experiment matrix and variant driver (re-runnable)pty-driver.js- standalone ConPTY + restricted-token driver used for the minimal reproDIAGNOSIS.md
matrix.js
pty-driver.js
variant.js
All reactions