Skip to main content
Vulnerability Database/CVE-2021-37576

CVE-2021-37576: Linux Kernel Buffer Overflow Vulnerability

CVE-2021-37576 is a buffer overflow flaw in the Linux Kernel on PowerPC platforms that enables KVM guest OS users to corrupt host OS memory. This article covers technical details, affected versions, and mitigations.

Updated:

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-2021-37576 Overview

CVE-2021-37576 is an out-of-bounds write vulnerability [CWE-787] in the Linux kernel's PowerPC KVM subsystem. The flaw resides in arch/powerpc/kvm/book3s_rtas.c and affects Linux kernel versions through 5.13.5 running on the PowerPC platform. A KVM guest OS user can supply a crafted rtas_args.nargs value to trigger host OS memory corruption. The issue is tracked upstream as commit ID CID-f62f3c20647e. Both Linux distributions and Fedora 33/34 shipped affected kernels and issued updates.

Critical Impact

A local guest user on a PowerPC KVM host can corrupt host kernel memory, leading to privilege escalation, host compromise, or denial of service across all tenants on the hypervisor.

Affected Products

  • Linux kernel through 5.13.5 on the PowerPC platform
  • Fedora 33
  • Fedora 34

Discovery Timeline

Technical Details for CVE-2021-37576

Vulnerability Analysis

The vulnerability exists in the PowerPC implementation of KVM's Run-Time Abstraction Services (RTAS) hypercall handler. RTAS is a firmware interface used by PowerPC guests to request operations from the hypervisor. The handler in book3s_rtas.c reads the nargs field from a guest-controlled rtas_args structure and uses it as a loop or copy bound without sufficient validation. Because the field is attacker-controlled, a malicious guest can specify a value that causes the host kernel to write beyond the bounds of the destination buffer. The result is host kernel memory corruption initiated from a low-privileged guest context.

Root Cause

The root cause is missing bounds enforcement on the nargs argument count passed by the guest through the RTAS interface. The hypervisor accepted the guest-supplied length without rejecting values that exceeded the fixed argument array size. This represents a classic trust boundary violation between guest and host, classified as an out-of-bounds write [CWE-787].

Attack Vector

Exploitation requires local access as a guest user on a PowerPC KVM host. The attacker issues a crafted RTAS hypercall from within the guest with an oversized nargs value. No host-side user interaction is needed. Successful exploitation corrupts host kernel memory, which an attacker can shape into arbitrary write primitives, kernel privilege escalation, or host crash conditions affecting every guest on the hypervisor.

The upstream fix is documented in the Linux kernel commit f62f3c20647e, which adds validation of the argument count before it is used.

Detection Methods for CVE-2021-37576

Indicators of Compromise

  • Unexpected host kernel oops, panic, or memory corruption traces on PowerPC KVM hosts referencing book3s_rtas or rtas_call symbols
  • Guest VMs issuing unusually high volumes of RTAS hypercalls or crashing the host during RTAS processing
  • Kernel ring buffer entries showing slab or stack corruption originating from KVM code paths on PowerPC hardware

Detection Strategies

  • Audit running kernel versions on PowerPC KVM hypervisors against the patched commit f62f3c20647e and downstream distribution advisories
  • Monitor dmesg and /var/log/kern.log for KVM-related corruption signatures following guest activity
  • Correlate guest-side process activity with host-side kernel instability using centralized telemetry

Monitoring Recommendations

  • Forward host kernel logs and KVM audit events to a central SIEM for anomaly review across the hypervisor fleet
  • Track patch deployment status for the Linux kernel, Fedora, Debian (DSA-4978), and NetApp (NTAP-20210917-0005) advisories
  • Alert on repeated guest crashes or hypercall errors that could indicate fuzzing of the RTAS interface

How to Mitigate CVE-2021-37576

Immediate Actions Required

  • Inventory all PowerPC hosts running KVM and identify kernels at or below 5.13.5
  • Apply vendor-supplied kernel updates from Fedora, Debian, and NetApp immediately
  • Restrict guest creation privileges on PowerPC hypervisors until patching is complete

Patch Information

The fix is included in upstream Linux kernel commit f62f3c20647e and backported to distribution kernels. Fedora 33 and 34 users should install the updates published in the Fedora package announcement. Debian users should apply DSA-4978. NetApp customers should consult NTAP-20210917-0005 for product-specific guidance.

Workarounds

  • Migrate KVM workloads off vulnerable PowerPC hosts to patched hypervisors where feasible
  • Limit guest OS user accounts and restrict guest access to trusted operators only
  • Disable or constrain RTAS hypercall use in guest configurations where the workload does not require it
bash
# Verify kernel version and confirm patch presence on a PowerPC KVM host
uname -r
rpm -q --changelog kernel | grep -i 'f62f3c20647e\|CVE-2021-37576'
# Debian/Ubuntu equivalent
dpkg -l linux-image-$(uname -r) && apt changelog linux-image-$(uname -r) | grep -i 'CVE-2021-37576'

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.