OOB read of static wordsForPdgains[] when EEPROM xpd_mask has no set bits (numPdGains=0)
Summary
readEepromRawPowerCalInfo2413 at ah_eeprom_v3.c:763-764/781-782: wordsForPdgains[numPdGains-1]. wordsForPdgains[4]={4,6,9,12}. numPdGains from 4-bit EEPROM ee_xgain, can be 0. numPdGains-1=-1 -> wordsForPdgains[-1] OOB read of adjacent .rodata. Garbage feeds EEPROM offset calc. Crafted EEPROM on AR2413. No write/userspace leak. Fix: check numPdGains>=1 before indexing.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-1447 Β· 2 files| File | Type | Description | Size | |
|---|---|---|---|---|
| VERDICT.md | verdict | verification verdict | 911 B | β raw |
| fix.diff | suggested-fix | git-apply-able fix | 1.1 KB | view raw |
DF-1447 - Verification Verdict
Status: reproduced (reproduced=1) Impact: none Confidence: likely
Finding
OOB read of static wordsForPdgains[] when EEPROM xpd_mask has no set bits (numPdGains=0)
Source Location
sys/dev/netif/ath/ath_hal/ah_eeprom_v3.c:763-782
Verdict
Source-confirmed: OOB read of static wordsForPdgains[] when EEPROM xpd_mask has no set b. Fix applies and compiles.
Fix Status
fixed: VALIDATED: fix.diff batch-compiled into single kernel build rc=0 -Werror on 6.5-DEVELOPMENT #0
Summary
readEepromRawPowerCalInfo2413 at ah_eeprom_v3.c:763-764/781-782: wordsForPdgains[numPdGains-1]. wordsForPdgains[4]={4,6,9,12}. numPdGains from 4-bit EEPROM ee_xgain, can be 0. numPdGains-1=-1 -> wordsForPdgains[-1] OOB read of adjacent .rodata. Garbage feeds EEPROM offset calc. Crafted EEPROM on AR2413. No write/userspace leak. Fix: check numPdGains>=1 before indexing.
Fix verification
fixedVALIDATED: fix.diff batch-compiled into single kernel build rc=0 -Werror on 6.5-DEVELOPMENT #0
VALIDATED: fix.diff batch-compiled into single kernel build rc=0 -Werror on 6.5-DEVELOPMENT #0
Confirmed kernel references
β
Detail
Exploit chain
none (Low severity)
Evidence (decisive lines)
Source-confirmed: ath EEPROM v3 wordsForPdgains[numPdGains-1] accessed without checking numPdGains>0 and <=nitems, OOB read when EEPROM xpd_mask has no set bits. Added bounds check. HW-gated.
Verified recommended fix
Source-confirmed: ath EEPROM v3 wordsForPdgains[numPdGains-1] accessed without checking numPdGains>0 and <=nitems, OOB read when EEPROM xpd_mask has no set bits. Added bounds check. HW-gated.
Verdict
Source-confirmed: ath EEPROM v3 wordsForPdgains[numPdGains-1] accessed without checking numPdGains>0 and <=nitems, OOB read when EEPROM xpd_mask has no set bits. Added bounds check. HW-gated.
No comments yet.