# CVE-2026-98142: drm/cirrus-qemu: Validate BAR0 size during probe

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.16% (percentile 3, 2026-11-28)
- **CWE:** CWE-787
- **Published:** 2026-09-25T10:36:17.832Z
- **Modified:** 2026-10-27T18:04:42.057Z

## Who should check

- Anyone running Linux \>= ab3e023b1b4c9887c9f0f761b47f3f0516bd3434, \< 2a0e7bcff3fa63e7309d2b39e18af59eb8ef2b6e; \>= ab3e023b1b4c9887c9f0f761b47f3f0516bd3434, \< 0b5084a1f070ad1fc34e11945644ae034bbc774c; \>= ab3e023b1b4c9887c9f0f761b47f3f0516bd3434, \< 26bd90c886218f36c9adeab206b0e27b4384e2f6; \>= ab3e023b1b4c9887c9f0f761b47f3f0516bd3434, \< 144f51cd0ccc3ad47a6099917b7bb535611fb18f; \>= ab3e023b1b4c9887c9f0f761b47f3f0516bd3434, \< 92312d333bf700798f92f30406c721bce87506f3
- Anyone running Linux 5.2

## Description

In the Linux kernel, the following vulnerability has been resolved:

drm/cirrus-qemu: Validate BAR0 size during probe

The \`cirrus-qemu\` driver relies on \`CIRRUS\_VRAM\_SIZE\` (4 MB) to validate
framebuffer sizes. However, during PCI probe, the driver mapped BAR0
without verifying that its size matches \`CIRRUS\_VRAM\_SIZE\`.

If a PCI device with a BAR0 smaller than 4 MB is bound to the driver, the
mapped VRAM will be smaller than expected. Because validation checks assume
4 MB VRAM, framebuffers larger than the mapped memory can be created.

When the display plane is updated (e.g. during release),
\`cirrus\_primary\_plane\_helper\_atomic\_update()\` copies the framebuffer to
VRAM using \`drm\_fb\_memcpy()\`. Writing past the end of the mapped I/O memory
causes a supervisor write page fault:

BUG: unable to handle page fault for address: ffffc9000389c000
...
RIP: 0010:memcpy\_toio+0x7c/0xe0 arch/x86/lib/iomem.c:110
...
Call Trace:
 \<TASK\>
 iosys\_map\_memcpy\_to include/linux/iosys-map.h:285 \[inline\]
 drm\_fb\_memcpy+0x325/0x5d0 drivers/gpu/drm/drm\_format\_helper.c:442
 cirrus\_primary\_plane\_helper\_atomic\_update+0x98a/0xb00
 drivers/gpu/drm/tiny/cirrus-qemu.c:358
 drm\_atomic\_helper\_commit\_planes+0x626/0xea0
 drivers/gpu/drm/drm\_atomic\_helper.c:3038
 drm\_atomic\_helper\_commit\_tail+0x60/0x510
 drivers/gpu/drm/drm\_atomic\_helper.c:1989
 commit\_tail+0x2b1/0x3c0 drivers/gpu/drm/drm\_atomic\_helper.c:2074
 drm\_atomic\_helper\_commit+0xa77/0xb10
 drivers/gpu/drm/drm\_atomic\_helper.c:2312

Fix this by validating in \`cirrus\_pci\_probe()\` that the PCI BAR0 resource
is not less than \`CIRRUS\_VRAM\_SIZE\`, returning \`-ENODEV\` if it is less.

## Affected and fixed versions

- Linux: \>= ab3e023b1b4c9887c9f0f761b47f3f0516bd3434, \< 2a0e7bcff3fa63e7309d2b39e18af59eb8ef2b6e; \>= ab3e023b1b4c9887c9f0f761b47f3f0516bd3434, \< 0b5084a1f070ad1fc34e11945644ae034bbc774c; \>= ab3e023b1b4c9887c9f0f761b47f3f0516bd3434, \< 26bd90c886218f36c9adeab206b0e27b4384e2f6; \>= ab3e023b1b4c9887c9f0f761b47f3f0516bd3434, \< 144f51cd0ccc3ad47a6099917b7bb535611fb18f; \>= ab3e023b1b4c9887c9f0f761b47f3f0516bd3434, \< 92312d333bf700798f92f30406c721bce87506f3 (cvelist)
- Linux: 5.2 (cvelist)

## Mitigation

- Upgrade Linux to 92312d333bf700798f92f30406c721bce87506f3 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-98142. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-98142.md
Affected: Linux >= ab3e023b1b4c9887c9f0f761b47f3f0516bd3434, < 2a0e7bcff3fa63e7309d2b39e18af59eb8ef2b6e; >= ab3e023b1b4c9887c9f0f761b47f3f0516bd3434, < 0b5084a1f070ad1fc34e11945644ae034bbc774c; >= ab3e023b1b4c9887c9f0f761b47f3f0516bd3434, < 26bd90c886218f36c9adeab206b0e27b4384e2f6; >= ab3e023b1b4c9887c9f0f76…
Fixed in: Linux 2a0e7bcff3fa63e7309d2b39e18af59eb8ef2b6e, Linux 0b5084a1f070ad1fc34e11945644ae034bbc774c, Linux 26bd90c886218f36c9adeab206b0e27b4384e2f6, Linux 144f51cd0ccc3ad47a6099917b7bb535611fb18f, Linux 92312d333bf700798f92f30406c721bce87506f3

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-98142 being exploited?

There is no confirmed exploitation: CVE-2026-98142 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.16% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-98142?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-98142?

Linux \>= ab3e023b1b4c9887c9f0f761b47f3f0516bd3434, \< 2a0e7bcff3fa63e7309d2b39e18af59eb8ef2b6e; \>= ab3e023b1b4c9887c9f0f761b47f3f0516bd3434, \< 0b5084a1f070ad1fc34e11945644ae034bbc774c; \>= ab3e023b1b4c9887c9f0f761b47f3f0516bd3434, \< 26bd90c886218f36c9adeab206b0e27b4384e2f6; \>= ab3e023b1b4c9887c9f0f761b47f3f0516bd3434, \< 144f51cd0ccc3ad47a6099917b7bb535611fb18f; \>= ab3e023b1b4c9887c9f0f761b47f3f0516bd3434, \< 92312d333bf700798f92f30406c721bce87506f3; Linux 5.2.

### Is there a fix for CVE-2026-98142?

Yes. Fixed in Linux 2a0e7bcff3fa63e7309d2b39e18af59eb8ef2b6e, Linux 0b5084a1f070ad1fc34e11945644ae034bbc774c, Linux 26bd90c886218f36c9adeab206b0e27b4384e2f6, Linux 144f51cd0ccc3ad47a6099917b7bb535611fb18f, Linux 92312d333bf700798f92f30406c721bce87506f3. Upgrade Linux to 92312d333bf700798f92f30406c721bce87506f3 or later.

### How do I check if I'm affected by CVE-2026-98142?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/2a0e7bcff3fa63e7309d2b39e18af59eb8ef2b6e>
- patch: <https://git.kernel.org/stable/c/0b5084a1f070ad1fc34e11945644ae034bbc774c>
- patch: <https://git.kernel.org/stable/c/26bd90c886218f36c9adeab206b0e27b4384e2f6>
- patch: <https://git.kernel.org/stable/c/144f51cd0ccc3ad47a6099917b7bb535611fb18f>
- patch: <https://git.kernel.org/stable/c/92312d333bf700798f92f30406c721bce87506f3>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-98142>

HTML: <https://flawdb.com/CVE-2026-98142> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-98142>
