CVE-2021-47570

5.5 MEDIUM

📋 TL;DR

This CVE describes a memory leak vulnerability in the Linux kernel's r8188eu Wi-Fi driver. When the rtw_wx_read32() function encounters an error condition, it fails to free allocated memory before returning, causing a memory leak. This affects systems using the r8188eu staging driver for Realtek 8188EU Wi-Fi chips.

💻 Affected Systems

Products:
  • Linux kernel with r8188eu staging driver
Versions: Linux kernel versions before the fix commits (be4ea8f383551b9dae11b8dfff1f38b3b5436e9a and c8d3775745adacf9784a7a80a82d047051752573)
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems using the r8188eu staging driver for Realtek 8188EU Wi-Fi adapters. The driver is in staging, meaning it's considered experimental/under development.

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

⚠️ Risk & Real-World Impact

🔴

Worst Case

An attacker could repeatedly trigger the error condition to cause a denial of service through memory exhaustion, potentially crashing the system or causing kernel instability.

🟠

Likely Case

Gradual memory consumption over time leading to system performance degradation, particularly on systems with limited memory resources.

🟢

If Mitigated

With proper memory monitoring and system resource limits, the impact would be limited to occasional memory pressure rather than system crashes.

🌐 Internet-Facing: LOW - This requires local access to trigger the memory leak condition through Wi-Fi driver operations.
🏢 Internal Only: MEDIUM - Local users or processes could potentially trigger this condition, but it requires specific Wi-Fi driver operations.

🎯 Exploit Status

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

Exploitation requires local access and ability to trigger specific Wi-Fi driver operations. No known public exploits exist.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Linux kernel versions containing commits be4ea8f383551b9dae11b8dfff1f38b3b5436e9a or c8d3775745adacf9784a7a80a82d047051752573

Vendor Advisory: https://git.kernel.org/stable/c/be4ea8f383551b9dae11b8dfff1f38b3b5436e9a

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing the fix commits. 2. Rebuild kernel if compiling from source. 3. Reboot system to load patched kernel.

🔧 Temporary Workarounds

Disable r8188eu driver

linux

Blacklist or disable the vulnerable r8188eu staging driver

echo 'blacklist r8188eu' >> /etc/modprobe.d/blacklist.conf
rmmod r8188eu

Use alternative Wi-Fi driver

linux

Switch to a different driver for Realtek 8188EU devices if available

modprobe -r r8188eu
modprobe alternative_driver_name

🧯 If You Can't Patch

  • Monitor system memory usage and implement alerts for abnormal memory consumption
  • Restrict local user access to systems using the vulnerable driver

🔍 How to Verify

Check if Vulnerable:

Check if r8188eu module is loaded: lsmod | grep r8188eu AND check kernel version against patched versions

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes fix commits: git log --oneline | grep -E 'be4ea8f383551b9dae11b8dfff1f38b3b5436e9a|c8d3775745adacf9784a7a80a82d047051752573'

📡 Detection & Monitoring

Log Indicators:

  • Kernel oom-killer messages
  • System memory exhaustion warnings in dmesg
  • High memory usage by kernel processes

Network Indicators:

  • None - this is a local memory leak vulnerability

SIEM Query:

source="kernel" AND ("Out of memory" OR "oom-killer" OR "memory allocation failure")

🔗 References

📤 Share & Export