CVE-2022-49001

7.0 HIGH

📋 TL;DR

This CVE describes a race condition vulnerability in the RISC-V Linux kernel's virtual memory stack overflow handling. When multiple processor cores (harts) simultaneously experience stack overflows, they can corrupt the shared shadow stack used for recovery, potentially leading to kernel crashes or privilege escalation. This affects systems running Linux kernels with RISC-V architecture support.

💻 Affected Systems

Products:
  • Linux Kernel
Versions: Specific RISC-V architecture kernels before the fix commits (7e1864332fbc1b993659eab7974da9fe8bf8c128, 879fabc5a95401d9bce357e4b1d24ae4a360a81f, ac00301adb19df54f2eae1efc4bad7447c0156ce)
Operating Systems: Linux distributions with RISC-V support
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems using RISC-V architecture. The vulnerability is in the vmap stack overflow handling mechanism.

📦 What is this software?

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic leading to system crash or potential privilege escalation to kernel mode, allowing complete system compromise.

🟠

Likely Case

System instability, kernel crashes, or denial of service conditions when multiple cores experience stack overflows simultaneously.

🟢

If Mitigated

Minor performance impact from the atomic locking mechanism, with no security impact when patched.

🌐 Internet-Facing: LOW - This requires local access to trigger stack overflow conditions.
🏢 Internal Only: MEDIUM - Local users or processes could potentially trigger this condition, but exploitation requires specific timing and conditions.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: NO
Unauthenticated Exploit: ✅ No
Complexity: HIGH - Requires local access and precise timing to trigger race condition between multiple processor cores.

Exploitation requires triggering stack overflows on multiple harts simultaneously, which is difficult to achieve reliably.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions containing the fix commits (7e1864332fbc1b993659eab7974da9fe8bf8c128, 879fabc5a95401d9bce357e4b1d24ae4a360a81f, ac00301adb19df54f2eae1efc4bad7447c0156ce)

Vendor Advisory: https://git.kernel.org/stable/c/7e1864332fbc1b993659eab7974da9fe8bf8c128

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing the fix commits. 2. For distributions: Use package manager to update kernel package. 3. Reboot system to load new kernel.

🔧 Temporary Workarounds

Disable vmap stack feature

linux

Disable virtual memory mapping for kernel stacks to avoid the vulnerable code path

Add 'nokaslr' or specific RISC-V kernel parameters to disable vmap stack feature (distribution specific)

🧯 If You Can't Patch

  • Restrict local user access to prevent potential exploitation
  • Implement strict resource limits to prevent stack overflow conditions

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if RISC-V architecture is used. Examine kernel configuration for vmap stack support.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes the fix commits. Check that spin_shadow_stack atomic variable implementation is present in kernel source.

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages
  • Stack overflow warnings in kernel logs
  • Multiple concurrent stack overflow events

Network Indicators:

  • None - this is a local vulnerability

SIEM Query:

Search for kernel panic events or stack overflow warnings in system logs on RISC-V systems

🔗 References

📤 Share & Export