# DF-2348 — PoC verdict

**File:** `sys/bus/u4b/uvc/uvc_buf.c`

**Verdict:** NOT REPRODUCED on this QEMU guest — confirmed HW/ACPI/device-gated; the code bug is REAL and a defense-in-depth `fix.diff` is attached.

## Mechanism (confirmed in source)

uvc_buf_queue_mmap_locked() computes max_offset=(uint64_t)(buf_size*buf_count)-PAGE_SIZE then guards it with if(max_offset<0) - a dead comparison since uint64_t is never negative. With dwMaxVideoSize=0 (kmalloc(0)=ZERO_LENGTH_PTR, buf_size=0) the subtraction underflows to a huge value and vtophys() is called on an unmapped address.

### Cited lines

- `sys/bus/u4b/uvc/uvc_buf.c:107`
- `sys/bus/u4b/uvc/uvc_buf.c:112-116`
- `sys/bus/u4b/uvc/uvc_buf.c:118-124`

## Why it does not reproduce on this guest

No USB webcam (UVC device) on the QEMU guest (usbconfig list shows no devices; no /dev/video*).

Guest gate-proof (full `usbconfig`/`pciconf`/`ifconfig`/`devinfo`/`sysctl`/`kldstat` output) is in `env.txt`.

## Defense-in-depth fix

Validate buf_count!=0 and no product overflow, require total>=PAGE_SIZE before subtracting, and compute max_offset without the dead unsigned check.

The git-apply-able diff is in `fix.diff` (verified `git apply --check` clean).

## Classification

- `status`: not_reproduced
- `reproduced`: 0
- `impact`: none (not reachable on this guest; latent code bug confirmed in source)
- `confidence`: certain (code bug + gate both confirmed by direct source trace and guest enumeration)
- `fix_status`: not_testable (patch applies + compiles-correct by inspection, but no live device to exercise on this guest)
