Advisory

GHSA-g5vv-q72c-7j78

Details, part 2 of 2. The advisory

Details

leaked_batch = (
after_batch.get("pendingRpcRequests", 0) ==
after_batch.get("expectedPendingRpcRequests", -1)
)

passed = leaked_single and leaked_batch and container_exit == 0

evidence = (
f"snapshotAfterClose={json.dumps(after_close)}; "
f"snapshotAfterBatch={json.dumps(after_batch)}; "
f"container_exit={container_exit}"
)
return passed, evidence

def main() -> None:
build_image()
data, container_exit = run_poc()

banner("Phase 3 — Evaluating results")
passed, evidence = evaluate(data, container_exit)

if passed:
print("[PASS] Leak confirmed: RPC waiter entries persist after socket close.")
else:
print("[FAIL] Leak NOT observed — check container output above.")

return passed, evidence, data

if __name__ == "__main__":
passed, evidence, raw = main()

verdict = "PASS" if passed else "FAIL"
reason = (
"소켓이 닫힌 뒤에도 hub.rpc.requests[] 항목과 setInterval 타이머가 해제되지 않음이 "
"런타임 검사로 확인됨. 단일 연결에서 pendingRpcRequests=1이 유지되고, "
"배치 5개 추가 후 총 6개가 누적되어 선형 리소스 누수가 증명됨."
if passed else
"컨테이너 실행 결과에서 결정적 증거를 확보하지 못했음."
)

result_path = SCRIPT_DIR / "phase2_result.json"
phase2 = {
"passed": passed,
"verdict": verdict,
"reason": reason,
"build_command": " ".join(BUILD_CMD),
"run_command": " ".join(RUN_CMD),
"poc_command": f"python3 {Path(__file__).name}",
"evidence": evidence,
"artifacts": ["Dockerfile", "verify.mjs", "poc.py"],
}

result_path.write_text(json.dumps(phase2, indent=2, ensure_ascii=False))
print(f"\n[INFO] Results written to {result_path}")

sys.exit(0 if passed else 1)

Sources & licences