Skip to main content
Vulnerability Database/CVE-2026-98142

CVE-2026-98142: Linux Kernel Privilege Escalation Flaw

CVE-2026-98142 is a privilege escalation vulnerability in the Linux kernel affecting the drm/cirrus-qemu driver. This flaw allows BAR0 validation bypass leading to memory corruption. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-98142 Overview

CVE-2026-98142 affects the Linux kernel's drm/cirrus-qemu driver. The driver maps PCI Base Address Register 0 (BAR0) during probe without verifying that its size matches CIRRUS_VRAM_SIZE (4 MB). When a PCI device presents a BAR0 smaller than 4 MB, the mapped video RAM is smaller than the driver assumes. Framebuffer validation checks still use the hardcoded 4 MB value, allowing creation of framebuffers larger than the mapped memory. Subsequent display plane updates call drm_fb_memcpy(), which writes past the end of mapped I/O memory and triggers a supervisor write page fault in the kernel.

Critical Impact

Out-of-bounds write in kernel I/O memory causes a page fault and kernel crash, resulting in denial of service on affected Linux systems using the cirrus-qemu display driver.

Affected Products

  • Linux kernel drm/cirrus-qemu driver (drivers/gpu/drm/tiny/cirrus-qemu.c)
  • Linux kernel versions prior to the fix commits listed in the stable tree
  • Virtualized guests exposing a Cirrus-compatible PCI display with a BAR0 smaller than 4 MB

Discovery Timeline

  • 2026-09-25 - CVE-2026-98142 published to the National Vulnerability Database (NVD)
  • 2026-09-30 - Last updated in NVD database

Technical Details for CVE-2026-98142

Vulnerability Analysis

The cirrus-qemu driver in drivers/gpu/drm/tiny/cirrus-qemu.c manages a legacy Cirrus Logic framebuffer device commonly exposed by QEMU to guest virtual machines. The driver maps PCI BAR0 as the video RAM region during probe and later uses CIRRUS_VRAM_SIZE (4 MB) as the authoritative upper bound when validating framebuffer dimensions.

When the actual BAR0 region is smaller than 4 MB, the driver still permits framebuffers sized up to the 4 MB assumption. During atomic plane updates, cirrus_primary_plane_helper_atomic_update() invokes drm_fb_memcpy(), which ultimately calls memcpy_toio() to copy framebuffer contents into the mapped I/O memory. The copy length is derived from the oversized framebuffer, not the actual mapping, producing an out-of-bounds write into unmapped kernel I/O address space.

Root Cause

The root cause is missing input validation during PCI probe. The driver trusts that any PCI device bound to it exposes a BAR0 at least CIRRUS_VRAM_SIZE bytes in length. Validation logic later in the driver reinforces this unchecked assumption, producing a classic Out-of-Bounds Write condition when the invariant is violated.

Attack Vector

Exploitation requires that a PCI device with a BAR0 smaller than 4 MB bind to the cirrus-qemu driver. In practice, this condition is reachable in virtualized environments where the hypervisor or device model controls BAR sizing. Once bound, normal display plane updates trigger the out-of-bounds memcpy_toio() and a supervisor write page fault, crashing the kernel. The resulting fault signature observed in the oops is RIP: 0010:memcpy_toio+0x7c/0xe0 with a call chain through drm_fb_memcpy and cirrus_primary_plane_helper_atomic_update.

No synthetic exploit code is provided. Technical specifics are available in the upstream commits referenced below.

Detection Methods for CVE-2026-98142

Indicators of Compromise

  • Kernel oops entries containing BUG: unable to handle page fault for address with RIP: 0010:memcpy_toio on the call stack
  • Call traces showing drm_fb_memcpy invoked from cirrus_primary_plane_helper_atomic_update in drivers/gpu/drm/tiny/cirrus-qemu.c
  • Guest VM crashes correlated with display reconfiguration, resolution changes, or release of the DRM device

Detection Strategies

  • Inventory Linux hosts and virtual machines running kernels that include the unpatched cirrus-qemu driver
  • Alert on kernel ring buffer messages referencing page faults in memcpy_toio or faults originating in DRM atomic helpers
  • Correlate guest crashes with hypervisor-side changes to emulated display BAR sizing

Monitoring Recommendations

  • Centralize dmesg and /var/log/kern.log collection for Linux guests to catch recurring DRM-related oops events
  • Monitor PCI device enumeration logs for Cirrus-compatible devices with non-standard BAR sizes
  • Track kernel version and patch level across virtualized Linux estates to confirm remediation coverage

How to Mitigate CVE-2026-98142

Immediate Actions Required

  • Apply the upstream kernel fix that validates BAR0 size in cirrus_pci_probe() and returns -ENODEV when the region is smaller than CIRRUS_VRAM_SIZE
  • Update to a stable Linux kernel release that includes the referenced commits
  • Prioritize patching virtualized Linux systems that rely on the Cirrus display model

Patch Information

The fix adds a size check in cirrus_pci_probe() so that the driver refuses to bind when BAR0 is smaller than CIRRUS_VRAM_SIZE (4 MB), returning -ENODEV. Upstream commits implementing the fix: Commit 0b5084a, Commit 144f51c, Commit 26bd90c, and Commit 92312d3.

Workarounds

  • Switch affected virtual machines from the Cirrus display model to an alternative such as std or virtio-gpu in the hypervisor configuration
  • Blacklist the cirrus kernel module on hosts where the driver is not required
  • Ensure the emulated display device presents a BAR0 of at least 4 MB until the kernel patch is deployed

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.