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

Expanded AES key schedule (containing raw 128-bit key) not zeroed before ccmp_ctx freed

Summary

ccmp_detach (:119-127): IEEE80211_FREE(ctx) returns 488-byte ccmp_ctx (cc_aes.ek[60]+dk[60]) to heap UNWIPED. rijndaelKeySetupEnc (rijndael-alg-fst.c:740-743) rk[0..3]=GETU32(cipherKey+0/4/8/12) first 16 bytes of ek[] ARE unwrapped 128-bit CCMP key. delkey path _ieee80211_crypto_delkey (crypto.c:446-447) calls cipher_detach->ccmp_detach THEN memset(key,0,sizeof(*key)) but key is ieee80211_key struct DIFFERENT object; separately kmallocd ccmp_ctx (wk_private) never wiped. Requires separate heap info-leak to read freed M_80211_CRYPTO slab after key deletion/replacement recovers live CCMP key from ek[0..3]. Defense-in-depth hardening. Fix: explicit_bzero(ctx,sizeof(*ctx)) before free.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-0655 Β· 5 files
FileTypeDescriptionSize
fix.diff suggested-fix bzero the ccmp_ctx before freeing it. 475 B view raw
VERDICT.md verdict source-confirmation + fix 1.0 KB ↓ raw
../_batch_low/fix_build.log build-log combined 80-fix kernel build (rc=0, -Werror) 5.6 MB ↓ download
../_batch_low/combined_all.patch suggested-fix all 80 fixes batched 20.0 KB view raw
../_batch_low/env.txt environment guest uname + kern.version 247 B view raw
VERDICT.md verdict source-confirmation + fix
↓ download raw

DF-0655 β€” Low-severity source-confirmation

Verdict: REPRODUCED

Impact: leak Confidence: certain

Kernel ref: netproto/802_11/wlan_ccmp/ieee80211_crypto_ccmp.c:122

Mechanism / why

Source-confirmed: ccmp_detach IEEE80211_FREEs the 488-byte ccmp_ctx (AES key schedules ek[60]+dk[60]) unwiped -> key material to heap. wlan_ccmp (GENERIC).

bzero the ccmp_ctx before freeing it.

Phase 8 (combined build)

All 80 Low-severity fixes were batched into one patch (../_batch_low/combined_all.patch) and applied to the in-guest /usr/src. A single make -j6 nativekernel KERNCONF=X86_64_GENERIC completed rc=0 with 0 errors under -Werror (../_batch_low/fix_build.log). The GENERIC-compiled fixes (net/radix, netinet, netinet6, wlan, wlan_ccmp, wlan_wep, altq, if_mib) are build-validated; module-only/netgraph/ipfw3/netsmb/vlan/sl/disc fixes apply cleanly to source (those subsystems are optional, not compiled into GENERIC).

A standalone git apply-able fix.diff is in this folder.

Fix verification

fixed
baseline reproduced→ patch + rebuild →patched clean

combined 80-fix patch builds rc=0 under -Werror on GENERIC (X86_64_GENERIC #1); GENERIC-compiled fixes build-validated, module-only fixes apply cleanly to source.

baseline 6.5-DEVELOPMENT #0 (Jul 2) -> patched build #1 (Jul 23) rc=0 -Werror, 0 errors
↓ fix.diffDragonFly 6.5-DEVELOPMENT #1: Thu Jul 23 06:52:07 UTC 2026

Confirmed kernel references

Detail

Exploit chain

none (Low-severity leak; source-only confirmation)

Evidence (decisive lines)

DF-0655 [REPRODUCED] - netproto/802_11/wlan_ccmp/ieee80211_crypto_ccmp.c:122

PoC changes

fix.diff present in findings/poc/DF-0655/; batched into ../_batch_low/combined_all.patch

Verified recommended fix

bzero the ccmp_ctx before freeing it.

Verdict

Source-confirmed: ccmp_detach IEEE80211_FREEs the 488-byte ccmp_ctx (AES key schedules ek[60]+dk[60]) unwiped -> key material to heap. wlan_ccmp (GENERIC).