CVE-2022-50167

5.5 MEDIUM

📋 TL;DR

This CVE describes a 32-bit integer overflow vulnerability in the Linux kernel's BPF subsystem when accessing large ARRAY maps. Attackers could exploit this to cause kernel crashes or potentially execute arbitrary code with kernel privileges. All Linux systems using affected kernel versions with BPF enabled are vulnerable.

💻 Affected Systems

Products:
  • Linux Kernel
Versions: Versions before the fix commits (specific versions vary by distribution; generally kernels before 5.15.74, 5.10.150, 5.4.225, 4.19.267, 4.14.300)
Operating Systems: Linux distributions using vulnerable kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Requires BPF functionality to be enabled and accessible; systems with BPF disabled via kernel configuration or security modules are not vulnerable.

📦 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 →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic leading to denial of service, or potential privilege escalation to kernel-level code execution allowing complete system compromise.

🟠

Likely Case

Kernel crash or denial of service through system instability, requiring reboot to restore functionality.

🟢

If Mitigated

No impact if BPF is disabled or systems are patched; limited impact if proper kernel hardening and isolation are implemented.

🌐 Internet-Facing: MEDIUM - Requires local access or ability to execute BPF programs; internet-facing systems with exposed BPF functionality could be vulnerable.
🏢 Internal Only: MEDIUM - Local attackers or malicious users could exploit this to disrupt systems or escalate privileges.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires ability to load and execute BPF programs, which typically requires CAP_BPF or CAP_SYS_ADMIN capabilities. No public exploits have been reported.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions containing commits 063e092534d4c6785228e5b1eb6e9329f66ccbe4, 3c7256b880b3a5aa1895fd169a34aa4224a11862, or 87ac0d600943994444e24382a87aa19acc4cd3d4

Vendor Advisory: https://git.kernel.org/stable/c/063e092534d4c6785228e5b1eb6e9329f66ccbe4

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version from your distribution's repositories. 2. Reboot system to load new kernel. 3. Verify kernel version after reboot.

🔧 Temporary Workarounds

Disable BPF functionality

linux

Prevent loading of BPF programs by disabling BPF syscalls

sysctl -w kernel.unprivileged_bpf_disabled=1
echo 1 > /proc/sys/kernel/unprivileged_bpf_disabled

Restrict BPF capabilities

linux

Use Linux Security Modules to restrict BPF usage

setcap -r /usr/bin/bpftool
configure SELinux/AppArmor to deny bpf syscalls

🧯 If You Can't Patch

  • Implement strict capability management to prevent unprivileged users from loading BPF programs
  • Deploy kernel hardening solutions like grsecurity or PaX to mitigate exploitation attempts

🔍 How to Verify

Check if Vulnerable:

Check kernel version and compare with patched versions from your distribution; verify if BPF is enabled via /proc/sys/kernel/unprivileged_bpf_disabled

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version contains the fix commits; test BPF functionality with controlled programs

📡 Detection & Monitoring

Log Indicators:

  • Kernel oops messages in dmesg or /var/log/kern.log
  • System crash/reboot events without clear cause
  • Failed BPF program loads with error codes

Network Indicators:

  • Unusual system instability or crashes following BPF-related activity

SIEM Query:

source="kernel" AND ("Oops" OR "general protection fault" OR "kernel panic") AND ("bpf" OR "BPF")

🔗 References

📤 Share & Export