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

Unlocked shared dmat->segments array across all load paths β€” concurrent loads on one tag corrupt each other's scatter/gather lists (vkernel never got pc64's bus_dma_tag_lock/BUS_DMA_CACHE_SEGMENTS fix)

Summary

All three load paths fill the single per-tag segments array with no locking anywhere in the file - two vkernel CPUs loading one tag interleave writes/callback reads: corrupted ds_addr/ds_len reaching the DMA engine (in the vkernel, DMA addresses index the vkernel process's own memory = kernel memory corruption), plus EINPROGRESS state relying on the shared array across the deferred window. pc64 hardened exactly this (tag_lock + cache_segments + per-call uio segments); the fork has none of it. SMP vkernel + any bus_dma driver (none stock). Mirror-pc64 fix.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

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

Fix verification

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

Confirmed kernel references

Detail

Evidence (decisive lines)

code-certain divergence vs pc64's fixes in finding markdown

Verified recommended fix

see finding markdown

Verdict

untested (Medium race / Low leak; needs a bus_dma driver inside a vkernel to exercise)