Repository navigation
Replies: 2 comments 1 reply
Follow-up: process-creation trace of the failure (Security 4688/4689, command-line auditing)Method: enabled Run 1 —
Run 2 — What the trace shows
I can attach the redacted 4688/4689 extract (two invocations, ~14 events) and the reproduction script if that helps. |
|
环境 Windows 10 家庭中文版,build 19045(10.0.19045),x64 workspace-write 下每一次 pwsh 工具调用都返回退出码 3221225794 = 0xC0000142(STATUS_DLL_INIT_FAILED),stdout 和 stderr 都是空的。 不是命令本身的问题:Write-Output ok 这种最小命令也一样失败,而且每次必现。 把同一个会话切到 danger-full-access 后,同样的命令立刻返回 ok、退出码 0。文件类工具(read / write / glob / grep)在两种模式下都正常。 复现步骤 启动桌面版,新建会话,沙箱设为 workspace-write 命令本身:一条 Write-Output 就复现,与脚本内容无关 现象与 #10329、#7523、#9779、#10165 一致:同一个退出码、同样的空输出、桌面版 Electron 宿主、Windows 10。 按 #7523 的分析,probeWindowsJob() 只做静态检查、从不真正拉起 runner,所以受限子进程在 DLL 初始化阶段死掉时没有回退到普通 spawn 的路径。按 #9779 的分析,打包后的 Electron 宿主没有 console,可能是触发条件之一——但这一条我无法验证:#9779 提到的 windows-acl-run: 判别行需要 stderr 有输出,而我这里 stdout/stderr 全为空。 诉求 希望给 probeWindowsJob() 加一次真实启动探测,失败时回退到 spawnSubprocess(#7523 提出的方案)。在此之前,桌面版用户只能用 danger-full-access,这等于默认的受限级别在 Windows 10 上不可用。 |
Uh oh!
There was an error while loading. Please reload this page.
Environment
@deepseek-ai/dsh-desktop-runtime0.2.1-rc.2), account = Administrator (elevated)C:\Program Files\PowerShell\7\pwsh.exe(also reproduced withcmd.exe)workspace-writeSymptom
Every
pwshtool call in aworkspace-writesession fails with exit code 3221225794 = 0xC0000142 (STATUS_DLL_INIT_FAILED) and completely empty stdout/stderr. Switching the session todanger-full-accessmakes the same commands work immediately. Reboot, reinstalling PowerShell 7, and fixing PATH all change nothing.What the spawned chain looks like (from Security 4688 with command line auditing)
Isolation (same argv, same workspace/temp, same elevated console)
DeepSeek Harness.exe(Electron,process.execPath)DeepSeek Harness.exeDeepSeek Harness.exenode.exeDeepSeek Harness.exe--write-sidgiven)node.exeAlso ruled out: workspace path (
C:\dshwsfails too), TMP/TEMP rewrite (patched out, still fails), ACE granting (seam-managed still fails), pwsh/.NET (cmd.exe fails identically).Instrumenting
dsh-sandbox-windows-acl/lib/runner.jsshows the runner itself survives:Suspected cause
Fails only when the runner is the Electron binary and the token carries the extra workspace-write capability SIDs (
S-1-4-...); read-only (same Electron parent, no capability SIDs) works, and the bundled node with capability SIDs also works. The source comment indsh-sandbox-windows-aclsays the token design was "verified on Win11 26200" — this machine is Win10 19045. Looks like aCreateProcessAsUserW+ WRITE_RESTRICTED/Low-IL interaction that differs by parent process and/or OS build on Windows 10.Impact
workspace-write— the default confinement level — is unusable on Windows 10 for any tool that spawns a process; users must either grantdanger-full-accessor fall back toread-only.Ask
Could you confirm whether Windows 10 (19045) is a supported target for the ACL sandbox, and whether using the bundled
node.exeinstead ofprocess.execPathfor the subprocess supervisor/runner is intended to work on Win10?Minimal reproduction
A self-contained PowerShell script that drives
dsh-sandbox-windows-acl/lib/runner.jsdirectly with the bundlednode.exevsDeepSeek Harness.exeand prints the exit codes; I can attach it if useful.All reactions