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

Heap OOB read: unvalidated VBIOS clock indices into SCLK/MCLK dependency tables

Summary

smu7_get_pp_table_entry_callback_func_v1 at :3179-3202: ucMemoryClockIndexLow/High and ucEngineClockIndexLow/High (u8 from VBIOS state record) used to index mclk/sclk_dep_table->entries[] without bounds check against ucNumEntries. Crafted PP table with index>table size -> OOB read of PP-table-adjacent kernel heap, value stored in power-state clock field exposed via sysfs. Fix: validate each index < table->ucNumEntries.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-1168 Β· 3 files
FileTypeDescriptionSize
VERDICT.md verdict Source-confirmation verdict for DF-1168 622 B ↓ raw
fix.diff suggested-fix Validate clock indices against table ucNumEntries 445 B view raw
../fix_build.log build-log Batch kernel build log (all fixes, rc=0) 5.6 MB ↓ download
VERDICT.md verdict Source-confirmation verdict for DF-1168
↓ download raw

DF-1168 Verification Verdict

Severity: Low Impact class: oob_read Verification method: Source-only confirmation (HW-gated, not triggerable on QEMU guest)

Verdict: REPRODUCED (source-confirmed)

The bug is confirmed in the audited source at the cited path:line. Triggerable but requires specific driver/config.

Fix: Validate clock indices against table ucNumEntries

Fix applied and validated in batch kernel build (rc=0, -Werror).

Fix validation

All 41-fix patches batched into single make -j6 nativekernel KERNCONF=X86_64_GENERIC build. Build result: rc=0, 0 errors (full -Werror clean).

Fix verification

fixed
baseline reproduced→ patch + rebuild →patched clean

VALIDATED: fix.diff applies cleanly + batch kernel build rc=0 -Werror; bug HW/module/runtime-gated, no runtime PoC re-test possible on guest.

VALIDATED: fix.diff applies cleanly + batch kernel build rc=0 -Werror; bug HW/module/runtime-gated, no runtime PoC re-test possible on guest.
↓ fix.diffcombined build rc=0

Confirmed kernel references

β€”

Detail

Exploit chain

none

Evidence (decisive lines)

REPRODUCED (source-only): smu7_get_pp_table_entry_callback_func_v1 uses u8 indices from VBIOS to index mclk/sclk_dep_table->entries[] without bounds check against table count. OOB.

Verified recommended fix

REPRODUCED (source-only): smu7_get_pp_table_entry_callback_func_v1 uses u8 indices from VBIOS to index mclk/sclk_dep_table->entries[] without bounds check against table count. OOB.

Verdict

REPRODUCED (source-only): smu7_get_pp_table_entry_callback_func_v1 uses u8 indices from VBIOS to index mclk/sclk_dep_table->entries[] without bounds check against table count. OOB.