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

ieee80211_node_dectestref implements non-atomic decrement-and-test: latent UAF trap

Summary

ieee80211_node_dectestref(:497-503): contract is atomic dec-and-test return 1 if hit zero. Implementation does atomic_subtract_int then atomic_cmpset_int(0,1) β€” two separate atomics with window between. cmpset also bumps 0->1 (spurious refcnt==1 on object about to be freed). Currently safe only because all callers hold IEEE80211_NODE_LOCK. Plain incref/decref (header:106-109) are lockless. Future lockless caller -> UAF on ieee80211_node. Defense-in-depth. Fix: single atomic cmpset loop old->old-1 return old==1.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-0539 Β· 1 files
FileTypeDescriptionSize
manifest.json file 416 B view raw

Fix verification

not_testable
baseline reproduced→ patch + rebuild →patched clean

recommended fix identified; fix.diff not authored/validated in this batch

recommended fix identified; fix.diff not authored/validated in this batch
combined build rc=0

Confirmed kernel references

β€”

Detail

Exploit chain

none (Info severity)

Evidence (decisive lines)

Source-confirmed at sys/netproto/802_11/wlan/ieee80211_dragonfly.c:497: non-atomic decrement-and-test (latent UAF trap)

Verified recommended fix

Source-confirmed at sys/netproto/802_11/wlan/ieee80211_dragonfly.c:497: non-atomic decrement-and-test (latent UAF trap)

Verdict

Source-confirmed at sys/netproto/802_11/wlan/ieee80211_dragonfly.c:497: non-atomic decrement-and-test (latent UAF trap)