CVE-2022-49236

7.8 HIGH

📋 TL;DR

This is a use-after-free vulnerability in the Linux kernel's BPF subsystem that occurs due to a race condition during module loading. It allows local attackers to potentially crash the kernel or execute arbitrary code. 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)
Operating Systems: All Linux distributions with affected kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only vulnerable if BPF subsystem is enabled (CONFIG_BPF_SYSCALL=y), which is common in modern distributions.

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

⚠️ Risk & Real-World Impact

🔴

Worst Case

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

🟠

Likely Case

Kernel crash/panic causing system instability and denial of service.

🟢

If Mitigated

No impact if BPF is disabled or kernel is patched.

🌐 Internet-Facing: LOW - Requires local access to exploit.
🏢 Internal Only: MEDIUM - Local attackers or malicious users could exploit this to disrupt systems or potentially escalate privileges.

🎯 Exploit Status

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

Requires local access and ability to load BPF programs. Race condition exploitation adds complexity.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions containing commits 0481baa2318cb1ab13277715da6cdbb657807b3f or later

Vendor Advisory: https://git.kernel.org/stable/c/0481baa2318cb1ab13277715da6cdbb657807b3f

Restart Required: No

Instructions:

1. Update Linux kernel to patched version from your distribution vendor. 2. For custom kernels, apply the fix commit and rebuild. 3. No reboot required for livepatch systems; otherwise reboot to load new kernel.

🔧 Temporary Workarounds

Disable BPF subsystem

all

Disable the BPF subsystem to prevent exploitation

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

Restrict BPF usage

all

Limit BPF program loading to privileged users only

sysctl -w kernel.unprivileged_bpf_disabled=2

🧯 If You Can't Patch

  • Implement strict access controls to prevent unprivileged users from loading BPF programs
  • Monitor for suspicious BPF program loading attempts and kernel crashes

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if BPF is enabled: uname -r && grep CONFIG_BPF_SYSCALL /boot/config-$(uname -r)

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version is patched: uname -r should be newer than vulnerable versions. Check if fix commit is present: git log --oneline | grep -i 'btf.*module.*race'

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic/Oops messages
  • BPF program loading failures
  • Module loading errors

Network Indicators:

  • None - local exploitation only

SIEM Query:

source="kernel" AND ("Oops" OR "panic" OR "BPF" OR "module")

🔗 References

📤 Share & Export