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

cmx_kqfilter is the only entry point without the sc==NULL||sc->dying guard β€” kevent() on a still-open fd after card detachment dereferences the NULL softc (kernel NULL-deref panic)

Summary

Every sibling entry validates sc/dying; kqfilter assigns kn_hook and computes klist=&sc->kq.ki_note unconditionally. No device_busy at open so detach is not blocked by open fds - card removal frees the softc and the next kevent on the still-dispatchable cdev dereferences NULL+offsetof(kq). The author's own filter_read defensively NULL-checks - registration missed it. Root-only device + physical removal. Guard fix.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-4676 Β· 1 files
FileTypeDescriptionSize
verdict.json file 918 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-4676

Confirmed kernel references

Detail

Exploit chain

[]

Evidence (decisive lines)

No device_busy so detach is not blocked by open fds; the filter_read itself defensively NULL-checks (author knew) but registration does not. Guard fix.

Verdict

not_run: needs CardMan 4040 PCMCIA hardware (absent from guest)