CVE-2022-23222
📋 TL;DR
This vulnerability in the Linux kernel's BPF verifier allows local users to perform privilege escalation through pointer arithmetic with certain *_OR_NULL pointer types. It affects Linux kernel versions through 5.15.14, enabling attackers with local access to gain root privileges on vulnerable systems.
💻 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 →⚠️ Risk & Real-World Impact
Worst Case
Full system compromise with root privileges, allowing complete control over the affected system, data exfiltration, and lateral movement.
Likely Case
Local privilege escalation from an unprivileged user to root, enabling installation of persistent malware, credential theft, and system manipulation.
If Mitigated
Limited impact if proper access controls restrict local user accounts and kernel hardening measures are implemented.
🎯 Exploit Status
Exploitation requires local access and understanding of BPF pointer arithmetic. Public proof-of-concept code exists in security advisories.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Linux kernel 5.15.15 and later
Vendor Advisory: https://www.kernel.org/
Restart Required: Yes
Instructions:
1. Update kernel to version 5.15.15 or later. 2. For distributions: Use package manager (apt/yum/dnf) to update kernel package. 3. Reboot system to load new kernel.
🔧 Temporary Workarounds
Disable unprivileged BPF
linuxPrevents unprivileged users from using BPF, reducing attack surface
sysctl -w kernel.unprivileged_bpf_disabled=1
echo 'kernel.unprivileged_bpf_disabled=1' >> /etc/sysctl.conf
sysctl -p
🧯 If You Can't Patch
- Restrict local user access and implement strict privilege separation
- Monitor for suspicious privilege escalation attempts and BPF-related system calls
🔍 How to Verify
Check if Vulnerable:
Check kernel version: uname -r. If version is 5.15.14 or earlier, system is vulnerable.
Check Version:
uname -r
Verify Fix Applied:
After update, verify kernel version is 5.15.15 or later with uname -r
📡 Detection & Monitoring
Log Indicators:
- Failed privilege escalation attempts
- Unusual BPF program loads
- Kernel oops or crashes
Network Indicators:
- None - local exploit only
SIEM Query:
Process where (parent_process_name contains "bash" or parent_process_name contains "sh") and process_name contains "uname" and command_line contains "-r"
🔗 References
- http://www.openwall.com/lists/oss-security/2022/01/14/1
- http://www.openwall.com/lists/oss-security/2022/01/18/2
- http://www.openwall.com/lists/oss-security/2022/06/01/1
- http://www.openwall.com/lists/oss-security/2022/06/04/3
- http://www.openwall.com/lists/oss-security/2022/06/07/3
- https://bugzilla.suse.com/show_bug.cgi?id=1194765
- https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=64620e0a1e712a778095bd35cbb277dc2259281f
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FCR3LIRUEXR7CA63W5M2HT3K63MZGKBR/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Z5VTIZZUPC73IEJNZX66BY2YCBRZAELB/
- https://security.netapp.com/advisory/ntap-20220217-0002/
- https://www.debian.org/security/2022/dsa-5050
- https://www.openwall.com/lists/oss-security/2022/01/13/1
- http://www.openwall.com/lists/oss-security/2022/01/14/1
- http://www.openwall.com/lists/oss-security/2022/01/18/2
- http://www.openwall.com/lists/oss-security/2022/06/01/1
- http://www.openwall.com/lists/oss-security/2022/06/04/3
- http://www.openwall.com/lists/oss-security/2022/06/07/3
- https://bugzilla.suse.com/show_bug.cgi?id=1194765
- https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=64620e0a1e712a778095bd35cbb277dc2259281f
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FCR3LIRUEXR7CA63W5M2HT3K63MZGKBR/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Z5VTIZZUPC73IEJNZX66BY2YCBRZAELB/
- https://security.netapp.com/advisory/ntap-20220217-0002/
- https://www.debian.org/security/2022/dsa-5050
- https://www.openwall.com/lists/oss-security/2022/01/13/1