← ALL ADVISORIES

LOW BYTERAY-2026-0262Disclosed

EDK II - NULL Pointer Dereference in XenStoreRegisterWatch

In XenStoreRegisterWatch, a XENSTORE_WATCH is allocated with AllocateZeroPool(sizeof(XENSTORE_WATCH)) without checking for NULL.

Advisory
BYTERAY-2026-0262
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 OvmfPkg/XenBusDxe/XenStore.c.
Credit
Argus-Systems

Executive Summary

In XenStoreRegisterWatch, a XENSTORE_WATCH is allocated with AllocateZeroPool(sizeof(XENSTORE_WATCH)) without checking for NULL. The next three lines dereference it via Watch->Signature, Watch->Node, and InsertTailList(&Watch->Link). A NULL return causes an immediate dereference. This function is called by XenBus device drivers to register watches on XenStore paths; while primarily guest-initiated, the allocation failure path is unguarded.

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 (OvmfPkg)
  • Affected commit: 70741a15d9a714323a5598eac47727e60507e22f (master, 2026-06-21). The code is present on that commit and later revisions that have not changed it.
  • Location: OvmfPkg/XenBusDxe/XenStore.c:1422
  • Function: XenStoreRegisterWatch
  • Category: error_handling

Technical Details

Controllability: SYSTEM_CONTROLLED — confidence: high. Constant-size, guest-initiated during driver watch registration.

Data Flow

At line 1422, Watch = AllocateZeroPool(sizeof(XENSTORE_WATCH)) is a constant-size allocation with no NULL check. At line 1423, Watch->Signature = XENSTORE_WATCH_SIGNATURE immediately dereferences the result. At line 1424, Watch->Node = XenStoreJoin(DirectoryPath, Node) further dereferences it. Called by XenBus device drivers during watch registration (guest-initiated).

Affected Callers

  • XenBusRegisterWatch (XenStore.c:1590, XENBUS_PROTOCOL.RegisterWatch)
  • XenBusRegisterWatchBackend (XenStore.c:1601, XENBUS_PROTOCOL.RegisterWatchBackend)

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. Memory pool exhaustion in guest firmware.
  2. XenBus driver attempts to register a watch.
  3. AllocateZeroPool fails.
  4. Watch->Signature dereferences NULL.

Impact

Denial of service — firmware crash during driver initialization.

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