fix(cli): report stage-3 placement misses instead of retrying silently
ci / macos-latest / py3.12 (push) Canceled after 0s
ci / macos-latest / py3.9 (push) Canceled after 0s
ci / ubuntu-latest / py3.12 (push) Canceled after 0s
ci / ubuntu-latest / py3.9 (push) Canceled after 0s
ci / windows-latest / py3.12 (push) Canceled after 0s
ci / windows-latest / py3.9 (push) Canceled after 0s

This commit is contained in:
ZSecurity
2026-10-24 14:41:03 +07:00
parent 663481efe2
commit 2b8b63e5ae
2 changed files with 10 additions and 0 deletions
+8
View File
@@ -234,6 +234,14 @@ retries**, with a counter file in `/out` incrementing 1→5 — so the worker su
cycles; what does not exist is a shared session. Anything that must survive between commands has
to be written to disk (`/out`) rather than held in memory.
Stage 3 can miss intermittently: A2's cheap OOM leaves the stale pointer at a slightly different
spot, B2 then completes normally (`200`, worker alive) instead of firing the destructor, and no
output appears. `poc exploit` prints
`no command output; B2 status=... - stage-3 placement missed` and retries the whole chain; keep
`--retries` at 3 or higher. Three consecutive cold starts (fresh container each) all succeeded on
attempt 1, so the miss is occasional rather than systematic.
For commands longer than the 200-byte carrier limit, write a script into `out/` and run
`python -m poc exec --cmd 'sh</out/c'`.
+2
View File
@@ -210,6 +210,8 @@ def exploit_once(args, prof):
print(proof)
return 0, proof
time.sleep(0.2)
print(" no command output; B2 status=%r - stage-3 placement missed"
% wire.status(r4))
return 1, ""
finally:
wire.release(held)