CVE-2021-4158
NixOS vulnerability analysis and mitigation

Overview

A NULL pointer dereference vulnerability was discovered in the ACPI code of QEMU, identified as CVE-2021-4158. The vulnerability was found in the pci_write() function within hw/acpi/pcihp.c, where a bus pointer was used without proper validation. This vulnerability was reported on December 22, 2021, affecting QEMU systems (MITRE CVE, Red Hat Bugzilla).

Technical details

The vulnerability stems from a NULL pointer dereference in the ACPI code where the bus pointer is used without verification in the pci_write() function. The issue was introduced in commit b32bd763 which added the 'acpi-index' property for PCI devices. The flaw occurs when an invalid selector is supplied, leading to the dereferencing of an unchecked NULL bus pointer (QEMU Commit, QEMU Issue).

Impact

When exploited, this vulnerability allows a malicious privileged user within the guest system to crash the QEMU process on the host, resulting in a denial of service condition. This impact affects the availability of the virtualization service (NVD, Ubuntu Security).

Mitigation and workarounds

The vulnerability was patched with a fix that validates the hotplug selector on access. The fix was implemented by adding validation checks before using the bus pointer in the pci_write() function. The patch was committed to the QEMU codebase and distributed through various Linux distribution updates (QEMU Patch).

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-69264CRITICAL9.8
  • JavaScriptJavaScript
  • pnpm
NoYesJan 07, 2026
CVE-2025-69263HIGH8.8
  • JavaScriptJavaScript
  • pnpm
NoYesJan 07, 2026
CVE-2025-69262HIGH7.8
  • JavaScriptJavaScript
  • pnpm
NoYesJan 07, 2026
CVE-2025-20807MEDIUM6.7
  • NixOSNixOS
  • android
NoNoJan 06, 2026
CVE-2026-21885MEDIUM6.5
  • NixOSNixOS
  • miniflux
NoYesJan 08, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management