CVE-2023-2163
📋 TL;DR
A Linux kernel vulnerability in the BPF verifier incorrectly marks unsafe code paths as safe, allowing attackers to perform arbitrary read/write operations in kernel memory. This can lead to privilege escalation, container escape, and full system compromise. Affects Linux kernel versions 5.4 and above.
💻 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 →⚠️ Risk & Real-World Impact
Worst Case
Full system compromise with root privileges, container escape to host system, and persistent backdoor installation.
Likely Case
Privilege escalation from unprivileged user to root, container escape in containerized environments, and kernel memory corruption.
If Mitigated
Limited impact if systems have BPF disabled, strict seccomp policies, or are running patched kernels.
🎯 Exploit Status
Exploit requires local access and ability to load BPF programs. Public exploit code exists in security research publications.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Linux kernel 6.2-rc1 and later, with backports available for stable kernels
Vendor Advisory: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=71b547f561247897a0a14f3082730156c0533fed
Restart Required: Yes
Instructions:
1. Update Linux kernel to patched version. 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 non-root users from loading BPF programs
sysctl -w kernel.unprivileged_bpf_disabled=1
echo 'kernel.unprivileged_bpf_disabled = 1' >> /etc/sysctl.conf
sysctl -p
Restrict BPF with seccomp
linuxUse seccomp filters to block bpf() syscall
Add SECCOMP_RET_ERRNO for BPF syscall in seccomp policies
🧯 If You Can't Patch
- Implement strict access controls to limit who can execute BPF programs
- Use container security solutions that block BPF syscalls at runtime
🔍 How to Verify
Check if Vulnerable:
Check kernel version: uname -r. If >=5.4 and <6.2-rc1, likely vulnerable. Check if BPF is enabled: lsmod | grep bpf
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version is >=6.2-rc1 or check with distribution vendor for backported patches. Test BPF functionality after patch.
📡 Detection & Monitoring
Log Indicators:
- Failed BPF program loads
- Kernel oops or panic logs
- Unexpected privilege escalation events
Network Indicators:
- Unusual outbound connections from kernel processes
- Container escape attempts
SIEM Query:
source="kernel" AND ("BPF" OR "verifier") AND ("error" OR "panic" OR "oops")
🔗 References
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=71b547f561247897a0a14f3082730156c0533fed
- https://bughunters.google.com/blog/6303226026131456/a-deep-dive-into-cve-2023-2163-how-we-found-and-fixed-an-ebpf-linux-kernel-vulnerability
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=71b547f561247897a0a14f3082730156c0533fed