CVE-2023-53135

7.1 HIGH

📋 TL;DR

This is a stack memory access vulnerability in the Linux kernel's RISC-V architecture implementation. When CONFIG_FRAME_POINTER is disabled and KASAN (Kernel Address Sanitizer) is enabled, the stack unwinding function can read beyond stack boundaries during kernel initialization, potentially causing kernel crashes or instability. It affects Linux systems running on RISC-V hardware.

💻 Affected Systems

Products:
  • Linux Kernel
Versions: Specific kernel versions with the vulnerable commit; check git references for exact ranges
Operating Systems: Linux distributions running on RISC-V architecture
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when CONFIG_FRAME_POINTER is unset AND KASAN is enabled. Most production systems don't enable KASAN.

📦 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 →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic during boot or system instability leading to denial of service, potentially requiring physical access to recover the system.

🟠

Likely Case

Kernel panic during boot when KASAN is enabled, preventing system startup.

🟢

If Mitigated

No impact if KASAN is disabled or CONFIG_FRAME_POINTER is enabled.

🌐 Internet-Facing: LOW - This is a kernel-level issue during initialization, not directly exploitable over network.
🏢 Internal Only: MEDIUM - Can affect system stability during boot on vulnerable RISC-V systems.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: NO
Unauthenticated Exploit: ✅ No
Complexity: HIGH

This appears to be a self-triggering bug during kernel initialization rather than an externally exploitable vulnerability. The issue manifests during boot when specific kernel configurations are used.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions with fixes from provided git commits

Vendor Advisory: https://git.kernel.org/stable/c/17fa90ffba20743c946920fbb0afe160d0ead8c9

Restart Required: Yes

Instructions:

1. Update to a kernel version containing the fix commits. 2. For custom kernels, apply the patch that replaces the vulnerable stack reading with READ_ONCE_NOCHECK in the RISC-V stack unwinding code. 3. Recompile and install the kernel. 4. Reboot the system.

🔧 Temporary Workarounds

Enable CONFIG_FRAME_POINTER

linux

Enable frame pointer support in kernel configuration to avoid the imprecise unwinding mode

Enable CONFIG_FRAME_POINTER=y in kernel configuration and rebuild

Disable KASAN

linux

Disable Kernel Address Sanitizer if not needed for debugging

Set CONFIG_KASAN=n in kernel configuration and rebuild

🧯 If You Can't Patch

  • Ensure KASAN is disabled in kernel configuration for production systems
  • Enable CONFIG_FRAME_POINTER to use precise stack unwinding instead of imprecise mode

🔍 How to Verify

Check if Vulnerable:

Check kernel configuration for CONFIG_FRAME_POINTER and CONFIG_KASAN settings. If CONFIG_FRAME_POINTER=n and CONFIG_KASAN=y on RISC-V, system may be vulnerable.

Check Version:

uname -r

Verify Fix Applied:

Check kernel version includes the fix commits or verify the walk_stackframe function uses READ_ONCE_NOCHECK for stack reads in imprecise mode.

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic during boot with KASAN stack-out-of-bounds errors
  • BUG: KASAN: stack-out-of-bounds in walk_stackframe+ messages in kernel logs

SIEM Query:

Search for 'KASAN: stack-out-of-bounds' AND 'walk_stackframe' in kernel/system logs

🔗 References

📤 Share & Export