DF-4619 / verdict.json
{ "finding_id": "DF-4619", "status": "reproduced", "reproduced": 1, "impact": "dos", "confidence": "certain", "verdict": "REPRODUCED on the DragonFly guest by compiling the verbatim kernel function bodies (sed-extracted ar5413.c:288-540 from /usr/src) against a faithful ar5413State layout: with an EEPROM-shaped crafted dataset (xpd_mask=0xF, Pmin pattern {0,58,58,58}, overlap 15) the unbounded kk walk at ar5413.c:497/:506/:520 wrote 40 uint16 cells (80 bytes) past pcdacTable[PWR_TABLE_SIZE_2413=128] into the Bank1Data..Bank6Data members of the heap-allocated ar5413State object (intra-object overflow; RF bank scratch corrupted). Exploitation is gated on attacker-supplied AR5413 hardware with crafted EEPROM (physical/supply-chain); realistic ceiling is radio misprogramming/crash, not privilege escalation. Fix validated: with kk<PWR_TABLE_SIZE_2413 guards the overflow is gone (bank canary intact).", "exploit_chain": "crafted EEPROM (AR5EPROM_VER5_0/eepMap=2, xpd_mask=0xF, flat-ish curves, Pmin {0,58,58,58}) -> ath attach reads cal dataset -> first channel set invokes ar5413SetPowerTable:577 -> getGainBoundariesAndPdadcsForPowers kk walk exceeds 128 -> pPDADCValues[128..167] overwrite Bank1/2/3/6Data -> corrupted RF banks programmed to the radio at next ar5413SetRfRegs (ar5413.c:249-253) + stale pdadc tail. No uid0 route: hardware-gated, intra-object, clamped 16-bit values.", "evidence": "run.log: lines DF-4619 REPRODUCED: ... first clobbered u16 cell 0 bytes past array end, last 79 bytes past; fix_run.log: DF-4619: NO overflow detected after patching; ar5413_harness.c + build.sh show the verbatim extraction from /usr/src.", "kernel_refs": [ "sys/dev/netif/ath/ath_hal/ar5212/ar5413.c:397", "sys/dev/netif/ath/ath_hal/ar5212/ar5413.c:495", "sys/dev/netif/ath/ath_hal/ar5212/ar5413.c:506", "sys/dev/netif/ath/ath_hal/ar5212/ar5413.c:520", "sys/dev/netif/ath/ath_hal/ar5212/ar5413.c:531", "sys/dev/netif/ath/ath_hal/ar5212/ar5413.c:554", "sys/dev/netif/ath/ath_hal/ar5413.c:35", "sys/dev/netif/ath/ath_hal/ar5413.c:777", "sys/dev/netif/ath/ath_hal/ah_eeprom_v3.h:282", "sys/dev/netif/ath/ath_hal/ah_eeprom_v3.c:656" ], "poc_changes": "harness written from scratch (no seed PoC): sed-extracts ar5413.c:288-540 verbatim at build time on the guest, faithful struct (bank rows 1/1/1/37/3 from ar5212.ini, verified offsets pcdac@72 Bank1@328 vpdI@1524 sizeof 2040), HALASSERT compiled out to mirror release (AH_ASSERT undefined), dataset crafted per ar2413SetupRawDataset/ar2413EepromToRawDataset shapes; spans >=2 chosen to isolate DF-4619 from the independent DF-4622 wrap", "attempts": 4, "guest_uname": "DragonFly dfbsd 6.5-DEVELOPMENT #0: Thu Jul 2 06:02:54 UTC 2026 root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64", "runtime_sec": 240, "guest_dirty": 0, "build_cmd": "sh build.sh (sed -n 288,540p /usr/src/sys/dev/netif/ath/ath_hal/ar5212/ar5413.c > ar5413_extracted.inc; cc -O2 -Wall -o ar5413_harness ar5413_harness.c)", "run_cmd": "./ar5413_harness 1", "code_hash": "fc8693ed15ae1678c4d1a170d2a138dd392f5a59d49cadbaab442826f4a371c1", "fix_status": "fixed", "fix_baseline_reproduced": 1, "fix_patched_reproduced": 0, "fix_kernel_uname": "DragonFly dfbsd 6.5-DEVELOPMENT #0 x86_64 (harness-level validation: patched function bodies re-extracted from pristine+fix.diff copy; kernel-build validation hardware-gated: no AR5413 on guest)", "fix_verdict": "fix.diff bounds the three pPDADCValues write loops with kk < PWR_TABLE_SIZE_2413; on the patched extraction mode 1 reports NO overflow detected with the bank canary region intact (baseline reproduced 168-cell walk, 80 bytes past).", "fix_evidence": "fix_run.log (PATCHED BUILD OK section): --- mode 1 ... DF-4619: NO overflow detected", "notes": "intra-object overflow only (stays inside the 2040-byte ath_hal_malloc allocation); values constrained (pdadc clamps 0/127). Sibling wraps found while isolating this one are filed separately as DF-4620/DF-4622.", "recommended_fix": "Bound all three pPDADCValues write loops with kk < PWR_TABLE_SIZE_2413 (see fix.diff)." } |