CVE-2021-47527
📋 TL;DR
A memory leak and resource management vulnerability in the Linux kernel's serial driver subsystem. When a serial port is closed, the transmit buffer isn't properly freed, causing memory leaks and potential indefinite waits for buffer draining operations. This affects any Linux system using serial ports, particularly embedded devices, servers with serial consoles, and systems with serial hardware.
💻 Affected Systems
- Linux kernel
📦 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
System memory exhaustion leading to denial of service, indefinite hangs during serial operations, or transmission of stale data when serial transmission restarts.
Likely Case
Gradual memory leak over multiple serial port open/close cycles, potentially causing system instability or performance degradation.
If Mitigated
Minimal impact with proper monitoring and memory management, though potential for occasional hangs during serial operations.
🎯 Exploit Status
Requires access to serial port operations. Exploitation would involve repeatedly opening/closing serial ports to cause memory exhaustion or triggering specific ioctl operations.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Kernel versions with fixes from the provided git commits
Vendor Advisory: https://git.kernel.org/stable/c/00de977f9e0aa9760d9a79d1e41ff780f74e3424
Restart Required: Yes
Instructions:
1. Update Linux kernel to patched version. 2. Check distribution-specific security advisories. 3. Reboot system to load new kernel.
🔧 Temporary Workarounds
Disable unused serial ports
linuxPrevent exploitation by disabling serial ports not in use
echo "blacklist serial_core" > /etc/modprobe.d/disable-serial.conf
update-initramfs -u
reboot
Monitor serial port usage
linuxDetect abnormal serial port open/close patterns
watch -n 60 "ls -la /dev/ttyS*"
journalctl -f | grep -i serial
🧯 If You Can't Patch
- Implement strict access controls to serial devices (chmod 600 /dev/ttyS*)
- Monitor system memory usage and serial port activity for signs of exploitation
🔍 How to Verify
Check if Vulnerable:
Check kernel version and if serial ports are in use: uname -r && ls -la /dev/ttyS*
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version is patched and monitor for memory leaks during serial port operations
📡 Detection & Monitoring
Log Indicators:
- Repeated serial port open/close events
- Increasing memory usage without clear cause
- Kernel oom-killer events
Network Indicators:
- Serial port traffic patterns (if monitored)
SIEM Query:
source="kernel" AND ("serial" OR "tty") AND ("open" OR "close" OR "memory")
🔗 References
- https://git.kernel.org/stable/c/00de977f9e0aa9760d9a79d1e41ff780f74e3424
- https://git.kernel.org/stable/c/011f6c92b5bf6e1fbfdedc8b5232f64c1c493206
- https://git.kernel.org/stable/c/1179b168fa3f3a6aae3bd140000455a0e58457db
- https://git.kernel.org/stable/c/64e491c1634b73d3bddc081d08620bdc92ab2c12
- https://git.kernel.org/stable/c/c5da8aa441053958594f94254592bb41264bdfbf
- https://git.kernel.org/stable/c/e1722acf4f0d4d67b60f57e08ce16f8b66cd4b8f
- https://git.kernel.org/stable/c/e74d9663fd57640fc3394abb5c76fa95b9cc2f2e
- https://git.kernel.org/stable/c/00de977f9e0aa9760d9a79d1e41ff780f74e3424
- https://git.kernel.org/stable/c/011f6c92b5bf6e1fbfdedc8b5232f64c1c493206
- https://git.kernel.org/stable/c/1179b168fa3f3a6aae3bd140000455a0e58457db
- https://git.kernel.org/stable/c/64e491c1634b73d3bddc081d08620bdc92ab2c12
- https://git.kernel.org/stable/c/c5da8aa441053958594f94254592bb41264bdfbf
- https://git.kernel.org/stable/c/e1722acf4f0d4d67b60f57e08ce16f8b66cd4b8f
- https://git.kernel.org/stable/c/e74d9663fd57640fc3394abb5c76fa95b9cc2f2e