# VERDICT — DF-1476: intel_gtt_insert_page swaps index/physical args to install_gtt_pte

## Verdict

**INCONCLUSIVE (HW/module gated) — source-level confirmed, fix validated.**

The bug is real and present in master DEV source at `sys/dev/agp/intel-gtt.c:1411`,
but the affected driver attaches only to hardware not present in the audit QEMU
guest, so it cannot be live-triggered here. The fix.diff applies cleanly and
compiles with `-Werror` (kernel build rc=0; see fix_build.log).

## Mechanism (cited path → primitive → effect)

Line 1411 `sc->match->driver->install_gtt_pte(intel_agp, addr, pg, flags)`. The callback signature is `(device_t dev, u_int index, vm_offset_t physical, int flags)` (line 186). The sibling intel_gtt_insert_sg_entries at 1429 passes `(intel_agp, pg_start+i, page, flags)` — proving the parameter order is index,physical. At 1411 the args are swapped: addr (the dma_addr_t physical) is passed as index, and pg (the GTT index) is passed as physical. Result: GTT entries written at the wrong offsets with wrong physical page addresses.

## Reachability on this guest

No — intel-gtt is part of the agp module and only meaningful on Intel integrated GPUs. The audit guest has no Intel IGD. Trigger requires an Intel IGD-bearing platform invoking intel_gtt_insert_page.

## Phase 6 — escalation potential

This is a argument swap (HW misprogramming) primitive. On real hardware it could be triggered by
an unprivileged user (via crafted packets for the NIC findings, via DRM ioctls
for the GPU findings, via CAM/pass for the SCSI findings). On **this guest**
there is no live primitive to convert. Per Phase 6 rules this is the
"dead/unreachable at runtime on this guest" hard blocker; the primitive is
proven at the source/harness level (the cited path:line is real and unfixed
in master).

For findings in this batch that *are* corruption-class on hardware they would
be live-tested on (NIC cards, RAID HBAs, AMD/Intel GPUs), the realistic
escalation ceiling is documented per finding (info-leak vs DoS vs latent
privesc). No `uid=0` claim is made — none is reachable on this guest.

## Phase 8 — fix validation

`fix.diff` is a minimal, targeted fix at the root cause confirmed above.

- **Applied cleanly** with `patch -p1 --forward` (verified in `fix_apply.log`).
- **Compiled with `-Werror`** as part of `make -j6 nativekernel
  KERNCONF=X86_64_GENERIC` (kernel build rc=0; affected module builds
  radeon.ko/amdgpu.ko/sound.ko/i915.ko/vga_switcheroo.ko all produced).
- For musycc.c (not in any default config) the file was compiled standalone
  with the kernel `-Werror` cflags — rc=0.

Swap the args: `install_gtt_pte(intel_agp, pg, addr, flags)`.

## PoC changes

Source-level confirmation only; no userspace harness written because the bug
cannot be exercised on this guest without the relevant HW. The placeholder
`build.sh`/`run.sh` echo pointers to `VERDICT.md` and the module/kernel
rebuild path.
