⬢ DragonFlyBSD Kernel Audit
DF-2363 / verdict.json
← back to finding ↓ download raw
{
 "finding_id": "DF-2363",
 "status": "not_reproduced",
 "reproduced": 0,
 "impact": "none",
 "confidence": "likely",
 "verdict": "The missing wipes are line-accurate facts: poly_key[32] (chachapoly.c:52) is bzeroed only before generation and never after use, and the ctx key schedule is only wiped in _final (:192/:196) - the EINVAL returns at :317/:338 leave it on the stack. But the runtime could not demonstrate residency above the rig noise floor: on the plain-encrypt success path the sibling frames of _update/_final recycle the exact stack region before the caller can scan it (measured: key-bytes and poly_key both absent after return), and the mbuf error path cannot be entered in isolation because any chain inconsistent with m_pkthdr.len trips the m_copydata/m_getptr KKASSERT inside _chacha20poly1305_mbuf first (two distinct panic captures in the pack). The explicit_bzero fix is still correct defense-in-depth and is validated by build; classifying not_reproduced because no observable leak was demonstrated on this guest.",
 "exploit_chain": "",
 "evidence": "run_fixed_kernel.log (aead/xchacha scans: absent; initframe scan found only the rigs own expected-value copy - documented artifact), panic captures for both mbuf-consistency attempts, fix.diff",
 "kernel_refs": [
  "sys/crypto/chachapoly.c:52",
  "sys/crypto/chachapoly.c:192",
  "sys/crypto/chachapoly.c:317",
  "sys/crypto/chachapoly.c:338"
 ],
 "poc_changes": "mbuf error-path scenario went through three chain shapes; each hit the mbuf subsystems own bounds assert before the chachapoly EINVAL - recorded as an observation about the error paths testability",
 "attempts": 6,
 "guest_uname": "DragonFly dfbsd 6.5-DEVELOPMENT #5 DFBATCH Wed Oct 21 21:27:34 UTC 2026 root:/usr/obj/usr/src/sys/DFBATCH x86_64 (rig kernel); stock baseline #0 X86_64_GENERIC",
 "runtime_sec": 1500,
 "guest_dirty": 0,
 "build_cmd": "kernel-compiled rig (DFBATCH)",
 "run_cmd": "sysctl debug.dfbatch.cmd=\"crypto 2363:<aead|xchacha|mbuferr|initframe>\"",
 "code_hash": "c872cf8f02a063d7e322cc53b4bf4154de47b7e3ebfae04a72e8b297023c5746",
 "notes": "fix validated A/B on the same rig: baseline behavior gone post-patch (see run_fixed* logs); rig kernel = X86_64_GENERIC + device dfbatch, INVARIANTS kept",
 "recommended_fix": "explicit_bzero poly_key after use and the ctx on the EINVAL error paths"
}