# PoC DF-1471: processpptables init_overdrive_limits NULL deref on missing FirmwareInfo

**Class:** NULL pointer dereference (DoS)
**Cited site:** `sys/dev/drm/amd/powerplay/hwmgr/processpptables.c:1062-1066`

## Reproduction status

HW/module gated — **cannot be live-triggered on the audit QEMU guest.**

No — amdgpu powerplay sub-driver; HW-gated as above. Trigger requires a GPU whose VBIOS lacks an AtomBIOS FirmwareInfo table.

The bug is **confirmed at the source level** by tracing the cited path:line in
`sys/dev/drm/amd/powerplay/hwmgr/processpptables.c` and confirming the vulnerable code is present in the master
DEV kernel tree. The `fix.diff` in this folder is validated to apply cleanly
and compile under `-Werror` (see `VERDICT.md`).

## Mechanism

Line 1062-1064 `fw_info = smu_atom_get_data_table(...)` returns NULL when no FirmwareInfo atom table exists. Line 1066 immediately derefs `fw_info->ucTableFormatRevision` with no NULL check → NULL deref → kernel panic on driver attach.

## Realistic impact ceiling

panic (DoS on driver attach)

## Fix

Add `if (fw_info == NULL) return 0;` between the smu_atom_get_data_table call and the first deref.

See `fix.diff` for the git-apply-able patch.

## How to validate the fix

```
# 1. Apply fix.diff against the in-guest source:
scp -F dfbsd-qemu/config fix.diff dfbsd:/root/DF-1471.diff
ssh -F dfbsd-qemu/config dfbsd 'cd /usr/src && patch -p1 < /root/DF-1471.diff'

# 2. Rebuild the affected module (preferred) or a single-fix kernel:
ssh -F dfbsd-qemu/config dfbsd 'cd /usr/src/sys/sys/dev/drm/amd/powerplay/hwmgr && make'

# 3. The compile must succeed with -Werror (it does — see build.log).
```
