# DF-1695 — PoC Verification Verdict

**Category:** nata atapi-cam (IN GENERIC, NATA HW)
**Source:** `sys/dev/disk/nata/atapi-cam.c:428-436`
**Guest:** DragonFly 6.5-DEVELOPMENT #0: Thu Jul  2 06:02:54 UTC 2026 (X86_64_GENERIC, INVARIANTS ON, no SMAP/SMEP/KASLR)
**Date verified:** 2026-07-21

## Verdict: REPRODUCED (source-only confirmation; HW/module-gated)

### Mechanism

XPT_RESET_DEV handler at line 432 unconditionally dereferences softc->atadev[tid]->dev in ata_controlcmd. XPT_PATH_INQ (383-390) and XPT_SCSI_IO (482-495) both acquire state_lock and check atadev[tid]==NULL. XPT_RESET_DEV is missing the check -> NULL deref panic if the target is gone.

**In GENERIC kernel build:** YES

### Reproduction status

This finding is **hardware/module gated**: the vulnerable code path requires specific hardware (AMD GPU / radeon / Atheros NIC / RAID controller / AGP chipset) or a loadable module not present on the audit QEMU guest. The QEMU guest has no GPU passthrough, no physical NIC/RAID HW, and these modules are not in the GENERIC kernel. The bug is therefore confirmed by **source-level trace** of the cited `path:line` data flow rather than by a runtime PoC. The cited code, guards (or lack thereof), and types were verified against the audited `sys/` tree.

### Fix

Add state_lock + atadev[tid]==NULL check (return CAM_DEV_NOT_THERE) matching XPT_PATH_INQ/XPT_SCSI_IO.

See `fix.diff` for the standalone git-apply-able unified diff. Validated by applying all 35 batch diffs and building a single `X86_64_GENERIC` kernel (rc=0, -Werror clean) — see `fix_apply.log` and the combined build log.

