CVE-2020-29661
📋 TL;DR
This CVE describes a use-after-free vulnerability in the Linux kernel's tty subsystem that allows attackers to potentially escalate privileges or crash systems. The flaw exists in the TIOCSPGRP ioctl handler where improper locking can lead to freed memory being accessed. All Linux systems running kernel versions through 5.9.13 are affected.
💻 Affected Systems
- Linux kernel
📦 What is this software?
Fedora by Fedoraproject
Fedora by Fedoraproject
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
Local privilege escalation to root, kernel panic leading to denial of service, or potential information disclosure from kernel memory
Likely Case
Local privilege escalation allowing unprivileged users to gain root access on vulnerable systems
If Mitigated
Limited impact with proper access controls and SELinux/AppArmor restrictions on tty device access
🎯 Exploit Status
Exploit requires local access and knowledge of kernel exploitation techniques. Public exploit code exists in security advisories.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Linux kernel 5.9.14 and later, or distributions' backported patches
Vendor Advisory: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=54ffccbf053b5b6ca4f6e45094b942fab92a25fc
Restart Required: Yes
Instructions:
1. Update kernel package using distribution's package manager (apt/yum/dnf). 2. Reboot system to load new kernel. 3. Verify kernel version after reboot.
🔧 Temporary Workarounds
Restrict tty device access
linuxLimit access to tty devices using filesystem permissions or mandatory access controls
chmod 600 /dev/tty*
chown root:root /dev/tty*
Use kernel live patching
linuxApply kernel live patch without reboot if supported by distribution
sudo ua attach <livepatch-token>
sudo canonical-livepatch enable <machine-token>
🧯 If You Can't Patch
- Implement strict access controls on /dev/tty devices
- Use SELinux/AppArmor to restrict tty ioctl operations
🔍 How to Verify
Check if Vulnerable:
Check kernel version: uname -r. If version is 5.9.13 or earlier, system is vulnerable.
Check Version:
uname -r
Verify Fix Applied:
After patching, verify kernel version is 5.9.14 or later, or check if distribution-specific patch is applied via package manager.
📡 Detection & Monitoring
Log Indicators:
- Kernel oops messages
- System crashes/reboots
- Unusual privilege escalation attempts
Network Indicators:
- None - local exploit only
SIEM Query:
source="kernel" AND ("Oops" OR "general protection fault" OR "use-after-free") AND "tty"
🔗 References
- http://packetstormsecurity.com/files/160681/Linux-TIOCSPGRP-Broken-Locking.html
- http://packetstormsecurity.com/files/164950/Kernel-Live-Patch-Security-Notice-LSN-0082-1.html
- http://www.openwall.com/lists/oss-security/2020/12/10/1
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=54ffccbf053b5b6ca4f6e45094b942fab92a25fc
- https://lists.debian.org/debian-lts-announce/2021/02/msg00018.html
- https://lists.debian.org/debian-lts-announce/2021/03/msg00010.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BOB25SU6XUL4TNP7KB63WNZSYTIYFDPP/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MZ7OAKAEFAXQRGBZK4LYUWINCD3D2XCL/
- https://security.netapp.com/advisory/ntap-20210122-0001/
- https://www.debian.org/security/2021/dsa-4843
- https://www.oracle.com/security-alerts/cpuoct2021.html
- http://packetstormsecurity.com/files/160681/Linux-TIOCSPGRP-Broken-Locking.html
- http://packetstormsecurity.com/files/164950/Kernel-Live-Patch-Security-Notice-LSN-0082-1.html
- http://www.openwall.com/lists/oss-security/2020/12/10/1
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=54ffccbf053b5b6ca4f6e45094b942fab92a25fc
- https://lists.debian.org/debian-lts-announce/2021/02/msg00018.html
- https://lists.debian.org/debian-lts-announce/2021/03/msg00010.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BOB25SU6XUL4TNP7KB63WNZSYTIYFDPP/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MZ7OAKAEFAXQRGBZK4LYUWINCD3D2XCL/
- https://security.netapp.com/advisory/ntap-20210122-0001/
- https://www.debian.org/security/2021/dsa-4843
- https://www.oracle.com/security-alerts/cpuoct2021.html