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

ar5212_attach: halKeyCacheSize taken unclamped from 4-bit EEPROM AR_EEP_KCENTRIES field (up to 32768) vs 128-entry hardware key table; every HAL keycache bounds check validates against the attacker-controlled value

Summary

halKeyCacheSize is stored verbatim from the EEPROM (1<<4-bit field = 1..32768) with no clamp to AR_KEYTABLE_SIZE=128, and every ar5212_keycache bound tests against halKeyCacheSize itself - so entries 128..32767 pass and produce MMIO writes far past the key table into the PHY register block. Latent OOB MMIO-write primitive; defused in-tree only by if_ath's ATH_KEYMAX=128 clamp. Exact structural sibling of DF-4520 (MAXQCU). AH_MIN clamp fix.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

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

Fix verification

not_testable
baseline no→ patch + rebuild →patched clean

not_testable

AH_MIN(val, AR_KEYTABLE_SIZE) clamp in finding markdown
per-fix-DF-4548

Confirmed kernel references

Detail

Exploit chain

[]

Evidence (decisive lines)

4-bit EEPROM field -> halKeyCacheSize up to 32768 vs AR_KEYTABLE_SIZE=128; every ar5212_keycache bound validates against the attacker value. Structural sibling of DF-4520 (MAXQCU). Crafted-EEPROM precondition; no ath hardware on guest.

Verdict

not_run: Low/hardware-gated hardening, no pack per contract