CVE-2017-5123
📋 TL;DR
CVE-2017-5123 is a Linux kernel vulnerability in the waitid system call that allows insufficient data validation, enabling local privilege escalation. It allows attackers to escape sandboxes and containers to gain root privileges on affected systems. This affects Linux systems with unpatched kernels.
💻 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 →⚠️ Risk & Real-World Impact
Worst Case
Full system compromise with root access, allowing complete control over the system, data theft, and persistence establishment.
Likely Case
Local privilege escalation from unprivileged user to root, enabling sandbox/container escape and system takeover.
If Mitigated
Limited impact if proper access controls, SELinux/AppArmor, and container isolation are in place, though kernel-level vulnerabilities remain serious.
🎯 Exploit Status
Exploit code is publicly available and relatively simple to execute. Requires local access to the system.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Linux kernel 4.13.4 and later
Vendor Advisory: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=96ca579a1ecc943b75beba58bebb0356f6cc4b51
Restart Required: Yes
Instructions:
1. Update Linux kernel to version 4.13.4 or later. 2. For distributions: Use package manager (apt/yum/dnf) to update kernel package. 3. Reboot system to load new kernel.
🔧 Temporary Workarounds
Restrict waitid system call
linuxUse seccomp to block the waitid system call in containers
Add waitid to seccomp filter deny list in container runtime configuration
User namespace restrictions
linuxDisable user namespace or restrict capabilities
sysctl -w kernel.unprivileged_userns_clone=0
capsh --drop=cap_sys_admin -- -c 'your_command'
🧯 If You Can't Patch
- Implement strict access controls and limit shell access to trusted users only
- Use container security features like seccomp profiles and capability dropping
🔍 How to Verify
Check if Vulnerable:
Check kernel version: uname -r and compare against 4.13.4
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version is 4.13.4 or later: uname -r
📡 Detection & Monitoring
Log Indicators:
- Unusual privilege escalation attempts
- Container escape attempts
- Failed waitid system calls with unusual parameters
Network Indicators:
- None - this is a local exploit
SIEM Query:
search 'kernel:.*waitid.*' OR 'privilege escalation' OR 'container escape' in system logs
🔗 References
- https://crbug.com/772848
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=96ca579a1ecc943b75beba58bebb0356f6cc4b51
- https://security.netapp.com/advisory/ntap-20211223-0003/
- https://crbug.com/772848
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=96ca579a1ecc943b75beba58bebb0356f6cc4b51
- https://security.netapp.com/advisory/ntap-20211223-0003/