# VERDICT -- DF-1383

## Verdict: INCONCLUSIVE at runtime; source bug CONFIRMED; fix COMPILE-VALIDATED

**Citations confirmed:**
  - sys/dev/netif/tl/if_tl.c:1794
  - sys/dev/netif/tl/if_tl.c:1795
  - sys/dev/netif/tl/if_tl.c:1799
  - sys/dev/netif/tl/if_tl.c:1807

### Is the bug real? -- YES (source trace)

tl_encap() packs mbufs into tl_frag[TL_MAXFRAGS=10]. If a 10-mbuf chain exactly
    fills the array (frag=10, m==NULL) and total_len<64, the pad block fires
with frag=10. The `if (frag == TL_MAXFRAGS)` check is just printf, no bail. Then
`f = &c->tl_ptr->tl_frag[10]` writes 8 bytes past the array; and
`tl_frag[frag-1].tlist_dcnt |= TL_LAST_FRAG` is index 9 (still in-bounds).
Trigger: TCP NODELAY 9x1-byte writes -> 10-mbuf chain with header < 64B total.

### Can it be reproduced on this guest? -- NO (hardware-gated)

No Texas Instruments ThunderLAN NIC in PCI list (only virtio_pci); if_tl.ko not in kldstat.

The tl driver is compiled into `X86_64_GENERIC`, is not loaded, and cannot be `kldload`'d by an unprivileged user (kldload is root-only). Even loaded, it would not attach without the hardware.
Therefore the vulnerable code is unreachable at runtime here. Because the sinks are device-integrated parsers / DRM ioctls / DMA-supplied indices / hardware-dependent paths, no userspace harness on this guest can exercise them. This is the documented valid hard-blocker "unreachable at runtime + no feasible harness"; the bug is a real latent defect with the live trigger conditions noted above.

### No escalation chain (and why that is correct here)
There is no memory-corruption primitive to escalate on this guest: the corruption sinks live entirely inside the not-attached driver behind hardware that is absent. The escalation work the audit expects (slab groom -> victim -> uid0) presupposes a reachable write primitive; here there is none on the guest. The deliverable is therefore the confirmed root-cause + a compile-validated fix.

### Fix (fix.diff) -- authored and COMPILE-VALIDATED
Added `return (1);` inside the `frag == TL_MAXFRAGS` branch of the pad block
so tl_encap returns an error instead of overflowing. (matches finding proposal.)

The fix was applied to in-guest `/usr/src` (all hunks applied cleanly) and the
kernel was rebuilt with `make -j6 nativekernel KERNCONF=X86_64_GENERIC` => rc=0 (see `build_fix.log`). No warnings or errors in the patched translation unit. The runtime before/after of the bug cannot be tested on this guest (no hardware), so fix_status is `not_testable` (diff applies + compiles; code path traced closed).

### Why not `not_reproduced` (false-positive)?
This is NOT a false positive. The cited `sys/` code is genuinely missing the guard / has the overflow / has the unclamped loop -- verified by reading the source. It is a real bug that is simply out of reach of this particular (driverless) QEMU guest.
