โฌข DragonFlyBSD Kernel Audit
DF-5482 / verdict.json
โ† back to finding โ†“ download raw
{
  "finding_id": "DF-5482",
  "status": "untested",
  "reproduced": false,
  "impact": "none",
  "confidence": "speculative",
  "verdict": "efi_lock is created LK_CANRECURSE (efirt.c:396), inviting nested acquisition, but efi_enter()/efi_leave() are single-flight by construction: efi_enter() unconditionally overwrites the global efi_savevm (efirt.c:352) and efi_leave() clears it (efirt.c:370). A nested entry (same thread) would save efi_vmspace over the real user vmspace; the inner leave then restores efi_vmspace onto itself and NULLs efi_savevm; the outer leave calls pmap_setlwpvm(td->td_lwp, NULL) โ†’ lp->lwp_vmspace = NULL (pmap.c:6408) โ†’ vmspace_pmap(NULL) at pmap.c:6410 โ†’ NULL-pointer panic. No nested path exists today (all six efi_enter call sites โ€” efirt.c:496/525/540/569/584/600 โ€” wrap exactly one call; firmware cannot re-enter the kernel), so this is a latent landmine, not a reachable bug: Info hardening. Untested by construction; recommend dropping LK_CANRECURSE so any future nesting fails loudly, or adding a per-thread depth counter.",
  "exploit_chain": "",
  "evidence": "VERDICT.md four-step trace: efirt.c:396 (LK_CANRECURSE), efirt.c:352 (unconditional global save), efirt.c:367-370 (restore+NULL), pmap.c:6408-6410 (NULL vmspace deref).",
  "kernel_refs": [
    "sys/platform/pc64/x86_64/efirt.c:396",
    "sys/platform/pc64/x86_64/efirt.c:352",
    "sys/platform/pc64/x86_64/efirt.c:367",
    "sys/platform/pc64/x86_64/pmap.c:6408"
  ],
  "poc_changes": "None โ€” trigger path does not exist in the current call graph (verified against all callers).",
  "attempts": 0,
  "guest_uname": "DragonFly dfbsd 6.5-DEVELOPMENT DragonFly 6.5-DEVELOPMENT #0: Thu Jul  2 06:02:54 UTC 2026  root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC  x86_64",
  "runtime_sec": 0,
  "guest_dirty": 0,
  "build_cmd": "",
  "run_cmd": "",
  "code_hash": "",
  "notes": "Info hardening finding; skipped PoC per contract (Low/Info).",
  "recommended_fix": "Remove LK_CANRECURSE from efi_lock (or track nesting depth per-thread and stack the saved vmspace).",
  "fix_status": "not_applicable",
  "fix_baseline_reproduced": 0,
  "fix_patched_reproduced": 0,
  "fix_verdict": "Not applicable โ€” latent defect, nothing to validate.",
  "fix_evidence": ""
}