← ALL ADVISORIES

LOW BYTERAY-2026-0245Disclosed

EDK II - NULL Pointer Dereference in XhcInitializeEndpointContext64

The 64-byte-context counterpart of XhcInitializeEndpointContext, used when the controller reports Csz != 0 (Xhci.c:1110-1113).

Advisory
BYTERAY-2026-0245
CWE
CWE-690
Vendor
TianoCore
Product
EDK II
Reported
2026-06-25
Disclosure
2026-10-29
Affected
EDK II at commit 70741a15d9a714323a5598eac47727e60507e22f (master, 2026-06-21); affected code in MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c.
Credit
Argus-Systems

Executive Summary

The 64-byte-context counterpart of XhcInitializeEndpointContext, used when the controller reports Csz != 0 (Xhci.c:1110-1113). Two EndpointTransferRing allocations at lines 3171 (BULK) and 3222 (INTERRUPT) have NO NULL CHECK AT ALL before being passed to CreateTransferRing. Line 3178 dereferences EndpointTransferRing->RingSeg0 in a DEBUG print.

This advisory is one of a set reported to VulnCheck on 2026-06-25 for coordinated disclosure to the EDK II maintainers. After several follow-ups over the following months no response was received. 126 days after the initial report, ByteRay is publishing the findings in good faith so that affected integrators can assess and remediate them. All findings were identified against EDK II commit 70741a15d9a714323a5598eac47727e60507e22f (master, 2026-06-21).

Affected Products and Versions

  • Vendor: TianoCore
  • Product: EDK II (MdeModulePkg)
  • Affected commit: 70741a15d9a714323a5598eac47727e60507e22f (master, 2026-06-21). The code is present on that commit and later revisions that have not changed it.
  • Location: MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c:3171
  • Function: XhcInitializeEndpointContext64
  • Category: error_handling

Technical Details

Controllability: SEMI_TRUSTED — confidence: high. Physical USB device triggers configuration on a 64-byte-context controller; the allocation size is fixed, so only pool exhaustion makes it fail.

Data Flow

At line 3171 (BULK case), EndpointTransferRing = AllocateZeroPool(...) has NO CHECK. At line 3173, CreateTransferRing dereferences NULL. Line 3178 dereferences EndpointTransferRing->RingSeg0 in DEBUG print. Line 3222 (INTERRUPT case) follows the identical pattern. Called from XhcSetConfigCmd64.

Affected Callers

  • XhcSetConfigCmd64

Sanitization / Security Controls

  • None.

Reachability and Preconditions

Attacker position and trust level for this issue are stated in the Controllability line and Data Flow above, and the concrete trigger is in Reproduction below.

Exploitability: Low
Realism: Low

Reproduction

  1. Physical access to USB port; XHCI controller using 64-byte contexts; memory pressure.
  2. XhcSetConfigCmd64 calls XhcInitializeEndpointContext64 to configure endpoints.
  3. At line 3171 (BULK case), AllocateZeroPool for EndpointTransferRing returns NULL with NO CHECK.
  4. At line 3173, CreateTransferRing dereferences NULL.
  5. Line 3222 (INTERRUPT case) follows the identical pattern.

Impact

Denial of service — firmware crash during USB configuration.

Remediation and Mitigation

As of commit 70741a15d9a714323a5598eac47727e60507e22f this issue is unfixed upstream and no CVE has been assigned. Check the allocation result for NULL before dereferencing it and fail the operation cleanly when allocation fails. The specific control that is absent or ineffective is identified in the Sanitization / Security Controls list under Technical Details.

Timeline

  • 2026-06-25 - Reported to VulnCheck for coordinated disclosure to the TianoCore / EDK II security team.
  • 2026-07 to 2026-10 - Several follow-ups sent; no response received.
  • 2026-10-29 - Public disclosure in good faith, 126 days after the initial report.

Credits

Discovered and reported by Argus-Systems.

References