ar2425: unbounded kk pdadc walk writes past pcdacTable[PWR_TABLE_SIZE_2413=128] β intra-object heap OOB write into RF bank scratch (twin of DF-4619/4648/4660/4680)
Summary
The three pdadc write loops share an unbounded kk while the sink is the 128-entry table followed by the RF bank scratch; with EEPROM-FEASIBLE legal curves (xpd_mask=0xF, spans 40-60, overlap 15) the walk reaches kk=173 - 90 bytes into the bank scratch later programmed to the radio. VERBATIM-EXTRACTION harness REPRODUCES (canary clobbered; fix validated -> no overflow). Cap-kk fix.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-4687 Β· 16 files| File | Type | Description | Size | |
|---|---|---|---|---|
| ar2425_harness.c | β | 19.2 KB | view raw | |
| build.sh | β | 85 B | view raw | |
| run.sh | β | 109 B | view raw | |
| fixA.diff | β | 1.2 KB | view raw | |
| fixB.diff | β | 921 B | view raw | |
| fixC.diff | β | 1.2 KB | view raw | |
| fixD.diff | β | 1009 B | view raw | |
| fix_validate.sh | β | 3.3 KB | view raw | |
| build.log | β | 773 B | view raw | |
| run.log | β | 3.8 KB | view raw | |
| fix_run.log | β | 10.2 KB | view raw | |
| env.txt | β | 435 B | view raw | |
| fix.diff | β | 1.2 KB | view raw | |
| VERDICT.md | β | 2.9 KB | β raw | |
| manifest.json | β | 914 B | view raw | |
| verdict.json | β | 4.0 KB | view raw |
DF-4687 -- verdict narrative
What was claimed
Unbounded kk pdadc walk writes past pcdacTable[PWR_TABLE_SIZE_2413=128] -- intra-object heap OOB write into RF bank scratch (twin of DF-4619/4648/4660/4680)
Reproduced?
YES (mode 1 of the shared verbatim-extraction harness, run on the DragonFly guest).
REPRODUCED on the DragonFly guest by compiling the verbatim kernel function bodies (anchor-extracted ar2425.c:246-494 from /usr/src, md5-verified == audit tree) against a faithful ar2425State layout (bank rows 1/1/1/29/3 from the shipped ar5212.ini; verified offsets pcdac@72 Bank1@328 Bank6@340 Bank7@456, sizeof 472 incl. tail padding): with an EEPROM-shaped crafted dataset (xpd_mask=0xF, Pmin pattern {0,58,58,58}, TPCRG5 overlap 15 -- register-realistic, the field is 4 bits) the unbounded kk walk at ar2425.c:452/:462/:473 wrote uint16 cells past pcdacTable[PWR_TABLE_SIZE_2413=128] into the Bank1Data..Bank7Data members of the ath_hal_malloc'd ar2425State object (intra-object overflow; kk ran to 173, last byte 89 past the array end; RF bank scratch corrupted, reprogrammed to the radio at ar2425.c:200-210). Fully EEPROM-feasible: each pd-gain span of 40-60 half-dB is constructor-legal, four gains sum past 128 by construction. Exploitation is gated on attacker-supplied AR2425/AR2417 hardware with crafted EEPROM (physical/supply-chain); realistic ceiling is radio misprogramming/crash, not privilege escalation. Twin of DF-4619 (ar5413) / DF-4648 (ar2316) / DF-4660 (ar2413) / DF-4680 (ar2317). Fix validated: with kk<PWR_TABLE_SIZE_2413 guards the overflow is gone (bank canary intact).
Fix validation
Harness-level validation (fix_validate.sh): baseline mode 1 clobbers bank cells 0..89 bytes past pcdacTable[127] (kk=173); with fixA (kk < PWR_TABLE_SIZE_2413 in all three loops) mode 1 reports 'NO overflow detected' and the 0xAAAA canary is intact. No kernel rebuild: no AR2425 hardware on the guest; validated against verbatim-extracted bodies per family methodology.
Decisive evidence: run.log: 'DF-4687 REPRODUCED ... first clobbered u16 cell 0 bytes past array end, last 89 bytes past (value 0x007f) => kk ran to 173'; fix_run.log: 'PATCHED mode 1 ... DF-4687: NO overflow detected'.
Why no in-kernel run
The guest has no AR2425 NIC and no EEPROM-injection path; the family methodology (DF-4619..DF-4683, all accepted with the same constraint) compiles the real function bodies against faithful struct/static layouts and proves the violation with exact-address faults / canaries / propagation -- equivalent strength for a hardware-gated defect, and it validates the fix the same way.
Fix status (batch validation)
Applied with the 36 sibling fix.diffs of this batch in findings/poc/_batch41/all_fixes.patch; single in-guest make -j6 nativekernel KERNCONF=X86_64_GENERIC completed RC=0 with zero errors under -Werror (full log: findings/poc/_batch41/fix_build8.log). Behavior A/B intentionally skipped for this Info-tier item.
Fix verification
fixedHarness-level validation (fix_validate.sh): baseline mode 1 clobbers bank cells 0..89 bytes past pcdacTable[127] (kk=173); with fixA (kk < PWR_TABLE_SIZE_2413 in all three loops) mode 1 reports 'NO overflow detected' and the 0xAAAA canary is intact. No kernel rebuild: no AR2425 hardware on the guest; validated against verbatim-extracted bodies per family methodology.
run.log: 'DF-4687 REPRODUCED ... first clobbered u16 cell 0 bytes past array end, last 89 bytes past (value 0x007f) => kk ran to 173'; fix_run.log: 'PATCHED mode 1 ... DF-4687: NO overflow detected'.
Confirmed kernel references
Detail
Exploit chain
crafted-EEPROM AR2425 card -> ath attach -> ar2425SetPowerTable (channel set/reset) -> ar2425getGainBoundariesAndPdadcsForPowers -> OOB write/wild read; ceiling radio misprogramming/panic (DoS), not uid0
Evidence (decisive lines)
run.log: 'DF-4687 REPRODUCED ... first clobbered u16 cell 0 bytes past array end, last 89 bytes past (value 0x007f) => kk ran to 173'; fix_run.log: 'PATCHED mode 1 ... DF-4687: NO overflow detected'.
PoC changes
ar2425-specific harness (vs DF-4680 template): the 5 function-scope static declarations (ar2425.c:367-379) are stripped from the verbatim extraction (asserted count) and re-bound to a guarded mmap block emulating kernel static storage -- ar2425 keeps the VpdTable/Pmin/Pmax scratch in .bss, not in ar2425State like the family twins; first build attempt had a macro/field name collision (offsetof) fixed by m_-prefixing the emulation fields; guest tar transfer ordering bug fixed (extract before overwrite)
Verified recommended fix
Bound all three pdadc write loops with kk < PWR_TABLE_SIZE_2413 (fixA).
Verdict
REPRODUCED on the DragonFly guest by compiling the verbatim kernel function bodies (anchor-extracted ar2425.c:246-494 from /usr/src, md5-verified == audit tree) against a faithful ar2425State layout (bank rows 1/1/1/29/3 from the shipped ar5212.ini; verified offsets pcdac@72 Bank1@328 Bank6@340 Bank7@456, sizeof 472 incl. tail padding): with an EEPROM-shaped crafted dataset (xpd_mask=0xF, Pmin pattern {0,58,58,58}, TPCRG5 overlap 15 -- register-realistic, the field is 4 bits) the unbounded kk walk at ar2425.c:452/:462/:473 wrote uint16 cells past pcdacTable[PWR_TABLE_SIZE_2413=128] into the Bank1Data..Bank7Data members of the ath_hal_malloc'd ar2425State object (intra-object overflow; kk ran to 173, last byte 89 past the array end; RF bank scratch corrupted, reprogrammed to the radio at ar2425.c:200-210). Fully EEPROM-feasible: each pd-gain span of 40-60 half-dB is constructor-legal, four gains sum past 128 by construction. Exploitation is gated on attacker-supplied AR2425/AR2417 hardware with crafted EEPROM (physical/supply-chain); realistic ceiling is radio misprogramming/crash, not privilege escalation. Twin of DF-4619 (ar5413) / DF-4648 (ar2316) / DF-4660 (ar2413) / DF-4680 (ar2317). Fix validated: with kk<PWR_TABLE_SIZE_2413 guards the overflow is gone (bank canary intact).
No comments yet.