EDK II - NULL Pointer Dereference in XhcPeiCreateEventRing
The PEI-phase counterpart of CreateEventRing.
- Advisory
- BYTERAY-2026-0249
- 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/XhciPei/XhciSched.c.
- Credit
- Argus-Systems
Executive Summary
The PEI-phase counterpart of CreateEventRing. Two UsbHcAllocateMem calls are guarded only by ASSERT before ZeroMem dereferences. Line 2684 for the Event Ring; second allocation at line 2703 (ERSTBase) with the identical pattern.
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/XhciPei/XhciSched.c:2684 - Function:
XhcPeiCreateEventRing - Category:
error_handling
Technical Details
Controllability: SYSTEM_CONTROLLED — confidence: high. Controller initialization path during PEI boot; no external input. Requires memory pressure.
Data Flow
At line 2684, Buf = UsbHcAllocateMem(...) with ASSERT-only at 2685, then ZeroMem(Buf, Size) at 2687 dereferences NULL. Second allocation at lines 2703–2706 follows the identical pattern (ERSTBase).
Affected Callers
XhcPeiInitSched
Sanitization / Security Controls
- ASSERT — DEBUG-only.
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
- PEI-phase boot; RELEASE build; memory pressure during controller init.
- PEI XHCI controller initialization calls
XhcPeiCreateEventRing. - At line 2684,
UsbHcAllocateMemreturns NULL on failure. ASSERT(Buf != NULL)at line 2685 compiles to no-op in RELEASE builds.ZeroMem(Buf, Size)at line 2687 dereferences NULL, crashing the firmware.
Impact
Denial of service — firmware crash during PEI XHCI init.
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.