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

MMalloc trace-table exhaustion (>=16384 outstanding allocations) makes Malloc() return NULL in VINUMDEBUG builds, breaking the never-fail M_WAITOK contract the vinum family relies on: unchecked callers NULL-deref (panic) and expand_table's CHECKALLOC longjmps out of crit_enter() without crit_exit() (leaked critical section)

Summary

The debug wrapper invents a failure kmalloc(M_WAITOK) cannot have (table-full -> return 0): unchecked vinumrevive.c callers deref NULL, and expand_table's CHECKALLOC longjmps past its crit_exit (permanent crit leak); the out-of-crit guard + per-CPU bookkeeping also permits a speculative malloced[16384] OOB write on 2 CPUs. VINUMDEBUG-only (stock vinum.ko has no VINUMDEBUG strings - verified on guest) + root. Skip-tracing-when-full fix restores the contract DF-5094 leaned on.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-5121 Β· 1 files
FileTypeDescriptionSize
verdict.json file 1.3 KB view raw

Fix verification

not_testable
baseline no→ patch + rebuild →patched clean
per-fix-DF-5121

Confirmed kernel references

Detail

Evidence (decisive lines)

source trace in finding markdown + stock-module string verification

Verified recommended fix

skip tracing when table full instead of returning NULL; move guard inside crit

Verdict

untested (VINUMDEBUG-only build; stock vinum.ko verified free of VINUMDEBUG on guest)