CVE-2022-50347
📋 TL;DR
This CVE describes a memory leak and potential kernel crash in the Linux kernel's mmc driver for Realtek RTSX USB SD/MMC card readers. If mmc_add_host() fails during device initialization, the driver doesn't properly clean up allocated resources, leading to memory leaks and potential crashes when removing the device. This affects Linux systems using Realtek RTSX USB SD/MMC card readers.
💻 Affected Systems
- Linux kernel with rtsx_usb_sdmmc driver
📦 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 →⚠️ Risk & Real-World Impact
Worst Case
Kernel panic or system crash when the vulnerable driver module is loaded/unloaded, potentially causing system instability or denial of service.
Likely Case
Memory leak leading to gradual resource exhaustion over time, particularly on systems with frequent SD/MMC card reader usage or driver module reloads.
If Mitigated
Minor performance impact from memory leaks if system has sufficient resources and driver isn't frequently reloaded.
🎯 Exploit Status
Exploitation requires local access to trigger the error condition in mmc_add_host(), which may require specific hardware states or timing.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Linux kernel with commits: 1491667d5450778a265eddddd294219acfd648cb, 7fa922c7a3dd623fd59f1af50e8896fd9ca7f654, 89303ddbb502c3bc8edbf864f9f85500c8fe07e9, 937112e991ed25d1727d878734adcbef3b900274, a522e26a20a43dcfbef9ee9f71ed803290e852b0
Vendor Advisory: https://git.kernel.org/stable/c/
Restart Required: No
Instructions:
1. Update Linux kernel to version containing the fix commits. 2. For distributions: Use package manager (apt/yum/dnf) to update kernel package. 3. Rebuild kernel if using custom kernel. 4. Reboot to load new kernel.
🔧 Temporary Workarounds
Disable vulnerable driver
allBlacklist or prevent loading of rtsx_usb_sdmmc kernel module
echo 'blacklist rtsx_usb_sdmmc' >> /etc/modprobe.d/blacklist.conf
rmmod rtsx_usb_sdmmc
Disable SD/MMC card reader
allDisable the USB device if not needed
echo '1-1' | sudo tee /sys/bus/usb/drivers/usb/unbind
🧯 If You Can't Patch
- Avoid using SD/MMC card readers on affected systems
- Monitor system memory usage for unusual leaks
- Restrict local user access to systems with vulnerable hardware
🔍 How to Verify
Check if Vulnerable:
Check if rtsx_usb_sdmmc module is loaded: lsmod | grep rtsx_usb_sdmmc
Check Version:
uname -r
Verify Fix Applied:
Check kernel version contains fix commits or modinfo shows patched version
📡 Detection & Monitoring
Log Indicators:
- Kernel oops messages
- 'mmc_add_host failed' errors in dmesg
- Memory allocation failures in kernel logs
Network Indicators:
- None - local driver issue
SIEM Query:
source="kernel" AND ("mmc_add_host" OR "rtsx_usb_sdmmc" OR "kernel panic")
🔗 References
- https://git.kernel.org/stable/c/1491667d5450778a265eddddd294219acfd648cb
- https://git.kernel.org/stable/c/7fa922c7a3dd623fd59f1af50e8896fd9ca7f654
- https://git.kernel.org/stable/c/89303ddbb502c3bc8edbf864f9f85500c8fe07e9
- https://git.kernel.org/stable/c/937112e991ed25d1727d878734adcbef3b900274
- https://git.kernel.org/stable/c/a522e26a20a43dcfbef9ee9f71ed803290e852b0
- https://git.kernel.org/stable/c/d7ad7278be401b09c9f9a9f522cf4c449c7fd489
- https://git.kernel.org/stable/c/df683201c7ffbd21a806a7cad657b661c5ebfb6f
- https://git.kernel.org/stable/c/e598c9683fe1cf97c2b11b800cc3cee072108220
- https://git.kernel.org/stable/c/fc38a5a10e9e5a75eb9189854abeb8405b214cc9