CVE-2021-47058

7.8 HIGH

📋 TL;DR

This is a use-after-free vulnerability in the Linux kernel's regmap subsystem where debugfs_name is freed but not set to NULL, potentially causing memory corruption. It affects Linux systems using the regmap framework for hardware register access. The vulnerability could lead to kernel crashes or privilege escalation.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Specific affected versions not explicitly stated, but references indicate stable kernel versions with the vulnerable commit.
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems using the regmap subsystem, typically for hardware register access in embedded systems or drivers.

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

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic leading to system crash or local privilege escalation to root via memory corruption.

🟠

Likely Case

System instability, kernel crashes, or denial of service when regmap operations are performed.

🟢

If Mitigated

Minimal impact with proper kernel hardening and limited regmap usage.

🌐 Internet-Facing: LOW - Requires local access to exploit.
🏢 Internal Only: MEDIUM - Local users or processes could potentially exploit this vulnerability.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires local access and knowledge of regmap subsystem usage. No public exploits known.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions with commit 2dc1554d5f0fdaf47cc5bea442b84b9226fea867 or later

Vendor Advisory: https://git.kernel.org/stable/c/2dc1554d5f0fdaf47cc5bea442b84b9226fea867

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version. 2. Check distribution-specific security advisories. 3. Reboot system after kernel update.

🔧 Temporary Workarounds

Disable debugfs for regmap

linux

Prevent debugfs_name allocation by disabling regmap debugfs support

echo 0 > /sys/kernel/debug/regmap/*/debugfs_enable

🧯 If You Can't Patch

  • Restrict local user access to systems using regmap subsystem
  • Implement kernel hardening measures like KASLR and stack protection

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if regmap debugfs is enabled: lsmod | grep regmap

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes the fix commit: uname -r and check kernel changelog

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages
  • Oops messages related to regmap or debugfs
  • System crash logs

Network Indicators:

  • None - local vulnerability only

SIEM Query:

source="kernel" AND ("regmap" OR "debugfs" OR "use-after-free")

🔗 References

📤 Share & Export