β¬’ DragonFlyBSD Kernel Audit
← triage Β· dashboard
DF-4677

cmx_detach lifetime holes: dying is checked unlocked before CMX_LOCK (TOCTOU across lockuninit) and registered knotes are never detached from sc->kq.ki_note β€” knote cleanup after softc free is a use-after-free

Summary

(a) open/read/write test dying outside the lock while detach sets it unlocked then lockuninits - a passed check proceeds to lock a destroyed lock. (b) detach KNOTEs only when polling was set; kqfilter-registered knotes stay on ki_note forever - after softc free, kqueue teardown's filter_detach computes klist on the dangling softc and knote_remove writes freed memory. device_busy + dying-under-lock + unconditional-KNOTE fix.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-4677 Β· 1 files
FileTypeDescriptionSize
verdict.json file 889 B view raw

Fix verification

not_testable
baseline no→ patch + rebuild →patched clean

not_testable: hardware-gated (no Bt848 / no CardMan on guest)

fix in finding markdown
per-fix-DF-4677

Confirmed kernel references

Detail

Exploit chain

[]

Evidence (decisive lines)

dying set unlocked, lockuninit before fds drain, KNOTE only when polling. device_busy + unconditional-KNOTE + dying-under-lock fix.

Verdict

not_run: root+physical gated; race variant same gating