[Bug 300848] bhyve: xHCI DCBAAP split write leads to NULL dcbaa_p assertion

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 17 Nov 2026 16:10:47 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300848

            Bug ID: 300848
           Summary: bhyve: xHCI DCBAAP split write leads to NULL dcbaa_p
                    assertion
           Product: Base System
           Version: 15.1-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bhyve
          Assignee: virtualization@FreeBSD.org
          Reporter: 1350430676@qq.com

Created attachment 277401
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=277401&action=edit
Reproduction bundle: PoC source, test script, runtime logs, crash output, and
SHA-256 manifest.

Environment:
- FreeBSD 15.1-RELEASE-p3 with snapshot-enabled bhyve/bhyvectl.
- Source releng/15.1 commit 88e7371d9.
- Device: xHCI with tablet at 0:7:0.

Only the high half of a DCBAAP write re-derives dcbaa_p. A guest can first
install a valid low address, then replace only the low 32 bits with an unmapped
GPA while the cache remains valid. The snapshot preserves both values. A later
high-half write re-derives dcbaa_p from the poisoned full value, stores NULL,
and a slot doorbell reaches:

    assert(sc->opregs.dcbaa_p != NULL);

Steps to reproduce:
1. Install a valid DCBAAP at 0x33000.
2. Write only DCBAAP low=0x80000000.
3. Clear MEMEN, save normally, and restore the unmodified snapshot.
4. Re-enable MEMEN, rewrite DCBAAP high=0, and ring slot 1.

Expected: reject the unmapped DCBAAP or return a recoverable slot error.
Actual: SIGABRT, bhyve exit 134.

The direct-run bad/control pair reproduces the same result without
save/restore, so the state is runtime-reachable.

Current status: the split-write cache update, serialized dcbaa_p, and assertion
are unchanged in main c8e73127e and releng/15.1 95719d8a8 (15.1-RELEASE-p6).

Impact: denial of service and loss of the VM.

Suggested fix: validate DCBAAP on low and high writes, re-derive or reject
dcbaa_p at restore, and replace the assertion with a checked error path.

-- 
You are receiving this mail because:
You are the assignee for the bug.