โฌข DragonFlyBSD Kernel Audit
triage board ยท dashboard

DragonFlyBSD kernel security audit โ€” maintainer briefing

A file-by-file adversarial audit of the DragonFlyBSD kernel tree (all of sys/, ~2,800 files, two full model passes), run under coordinated disclosure. Every finding below was machine-verified on the stock kernel of a QEMU/KVM guest (DragonFly 6.5-DEVELOPMENT, INVARIANTS build): a working proof-of-concept was executed, the cited path:line was confirmed in the shipped binary, and โ€” for 5576 of them โ€” the proposed patch was built into a single-fix kernel and the PoC re-run to prove the bug is gone. Nothing on this page is speculative: 3431 findings reproduced live, 799 were honestly refuted or gated by missing hardware, and every verdict carries a full evidence pack (sources, untrimmed logs, panic transcripts, fix.diff) you can re-run yourself.

5814
findings
DF-0001 โ€ฆ DF-5814
5813
machine-verified
Phase V PoC on the stock kernel
3431
reproduced
bug confirmed live in the guest
2649
fixes A/B-validated
patched kernel, PoC re-run clean
10
demonstrated uid=0
DF-1326, DF-1359, DF-2769, DF-3017, DF-3156, DF-3197โ€ฆ

SMAP and SMEP do not neutralize the headline chains. We re-ran the weapons on a guest with CR4.SMAP and CR4.SMEP both enabled (rcr4()=0x340630, stock kernel): DF-5845 reached uid=0 on the first attempt (every forged object and its stub live in kernel heap, which this kernel maps RWX โ€” pmap_kenter never sets PG_NX); the DF-3017 devfs chain was re-targeted to uid=0 with both protections on (kernel-heap fake ops table + kernel-text jmp *%rbx gadget + credential-zeroing stub; unprivileged lstat only); DF-2769 is pure logic and immune by construction. Data-only and heap-resident chains are protection-independent โ€” the durable fixes are the small kernel patches, not the CPU flags. Full matrix with logs: findings/SMAP-SMEP-REVIEW.md. Boot note: identcpu.c masks SMEP under CPUID2_VMM by default, so virtualized DragonFly currently runs with SMEP off on capable hardware unless hw.cpu_stdext_disable=0.

1 ยท Read these first โ€” demonstrated unprivileged โ†’ root

These chains were driven to uid=0 on the stock kernel (film-ready logs in each evidence pack). They are ordered by how easy they are to trigger. Each is independently fixed by a small patch; the two halves of the DF-3017 chain are both needed to close the composite.

IDSeverityWhat it is (plain language) PreconditionsFix
DF-3017Critical reproduceddevfs device-node lifetime hole (raced cdev becomes attacker-authored) chained with the DF-2694 socket bug for information reconnone โ€” any local user, no groups/mounts/interaction~55-line locking fix in devfs; DF-2694 is a separate 24-line fix
DF-5845Critical reproducedfirewire FW_ASYREQ copies ioctl data to the ADDRESS of a pointer field, forging an adjacent transfer objectoperator group on a FireWire-equipped host (i915-era laptops, add-in cards)one-character fix (drop the &) + a length bound
DF-3156Critical reproducedcd9660 Rock Ridge name parsing overflows a stack buffer on a crafted ISOattacker-supplied ISO mounted (physical media, downloaded image, or vfs.usermount); constant-injection friendly2-line fix (rewind the output pointer)
DF-2769High reproduceda killed root terminal session leaves a stale world-writable pty master that a user re-opens and injects into the NEXT root sessionnone beyond a root shell having existed on the box11-line admission check in ptcopen
DF-1326Critical reproducedmpr SAS driver PASS_THRU ioctl stack smash (legacy path, needs the HBA)operator group + LSI SAS2008-class controllerbounded copy in the ioctl path
DF-1359Critical reproducedmps SAS driver sibling of DF-1326operator group + LSI MPS controllerbounded copy in the ioctl path

Testing DF-5845 on real hardware? There is a step-by-step field guide for two DragonFly boxes and a FireWire cable here: DF-5845 field test.

2 ยท Quick wins โ€” small patches, real impact

A hand-picked list of verified fixes that are tiny and self-contained: ideal first commits. All are A/B-validated on rebuilt kernels unless marked otherwise on their finding page.

IDSeverityWhat it fixesPatch size
DF-0165Highcaps: jail policy bypass โ€” argument corrupted before the check4 lines
DF-3156Criticalcd9660: stack overflow โ†’ root shell from a crafted ISO2 lines
DF-5845Criticalfirewire: kernel heap overwrite โ†’ root (operator)1 char + bound
DF-2769Highpty: stale master re-open hijacks next root session11 lines
DF-2244Infoiconv: sysctl strcpy into 31-byte stack fieldstrlcpy + length check
DF-2261Lowgdbstub: register index OOB write (console holder)bounds fix
DF-2384Lowacpi_hp: unprivileged sysctl leaks heap past short BIOS replylength check
DF-3084Lowext2fs: negative directory size โ†’ unpriv kernel panic via touch(1)sign check
DF-3359Lowrtsock: unpriv route-socket heap-pointer leak (needs one poisoned ifaddr)clamp sa_len
DF-3389MediumIPv6: deferred-transport UAF read of freed ifaddr under churnsnapshot flags
DF-2715Inforecvmsg leaks kernel-internal flag bit to userspacestrip force bits
DF-5848Lownfsd: unauthenticated remote TCP panic via misaligned RPC recordsaccept MT_HEADER
DF-5846Mediumnlookup: unprivileged reliable panic via rmdir-of-cwd raceNULL-parent guard
DF-2533Mediumxdisk: leaked global lock wedges subsystem; wrong-lock release panicsunlock pattern
DF-2454Lowdevice-mapper striped table: heap OOB write of table textclamp advances

3 ยท How to work the rest

Triage board: triage.html lists every finding grouped in your requested priority order (hammer2 โ†’ memory corruption โ†’ privilege escalation โ†’ kernel leaks โ†’ base system โ†’ legacy โ†’ contrib), with per-finding state, priority, owner and comments โ€” the team can edit states through the collaboration API built into this site.

Finding pages: every finding has a page with the full write-up, CVSS, CVE cross-reference, the verification verdict, the validated fix.diff, and a browsable copy of the cited source lines.

Evidence packs: each verified finding ships its pack at findings/poc/DF-NNNN/ โ€” build.sh / run.sh reproduce the exact result; VERDICT.md is the narrative. Everything is deterministic on the stock 6.5-DEVELOPMENT INVARIANTS kernel the audit shipped with.

Severity honesty: findings marked not reproduced were chased to ground and closed with the reason (hardware-gated, structurally unreachable, or refuted outright). We do not inflate; a quiet negative result is recorded with the same care as a hit.

4 ยท Disclosure

Coordinated disclosure: findings stay private to the audit contributors and the DragonFly project until fixes are confirmed or the 90-day embargo lapses. PoC material is not published before then. The one publicly disclosed item so far is CVE-2026-110912 (DF-0494). Contact and embargo dates are tracked per-finding in the triage board.