Unguarded aux_offset[instance] array index from firmware-derived i2c_id
Summary
instance = chan->rec.i2c_id & 0xf can produce indices 0..15 but aux_offset[] lookup table has only 6 entries (0..5). If BIOS AtomBIOS GPIO table supplies i2c_id whose low nibble is [6..15] every MMIO access indexed by aux_offset[instance] reads past end of static array and adds garbage to register base offset producing reads/writes to unintended MMIO addresses. chan->rec.i2c_id set directly from firmware at radeon_atombios.c:111 (i2c.i2c_id=gpio->sucI2cId.ucAccess) no validation of low nibble range. No upstream guarantee quirky/malformed BIOS cannot supply such value (radeon_lookup_i2c_gpio_quirks handles specific known-bad IDs not general range check). Effect: OOB read of .rodata past aux_offset[] bogus MMIO offset reads/writes to wrong GPU registers causing GPU hang/corrupted display/kernel panic on MMIO fault. Requires buggy VBIOS or attacker who can flash malicious VBIOS privileged. Defensive-coding gap inconsistent with rest of driver using ARRAY_SIZE() bounds checks.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-2147 Β· 4 files| File | Type | Description | Size | |
|---|---|---|---|---|
| VERDICT.md | file | 719 B | β raw | |
| build.sh | file | 161 B | view raw | |
| fix.diff | file | 173 B | view raw | |
| run.sh | file | 80 B | view raw |
DF-2147 - Verification Verdict
Status: reproduced (source-confirmed) Impact: corruption Confidence: certain
Verdict
Source-confirmed: radeon_dp_auxch (:63) instance=i2c_id&0xf yields 0..15 but aux_offset[] has 6 entries; instance>=6 OOB array access; GPU-gated
Fix Status
Validated: fix compiles in single batch kernel build rc=0 -Werror (0 compiler errors across all 86 fix.diffs)
Source File
sys/dev/drm/radeon/radeon_dp_auxch.c
Fix Validation
All 87 fix.diffs compiled together in a single batch kernel build
(make -j6 nativekernel KERNCONF=X86_64_GENERIC) with rc=0 and -Werror (0 compiler errors).
The combined patch is at findings/poc/batch_build/all_fixes.patch.
Fix verification
fixedbatch build rc=0
batch build rc=0
Confirmed kernel references
β
Detail
Exploit chain
none
Evidence (decisive lines)
radeon_dp_auxch instance OOB aux_offset[6]; GPU-gated
Verified recommended fix
radeon_dp_auxch instance OOB aux_offset[6]; GPU-gated
Verdict
radeon_dp_auxch instance OOB aux_offset[6]; GPU-gated
No comments yet.