CVE-2022-50363

5.5 MEDIUM

📋 TL;DR

A use-after-free vulnerability in the Linux kernel's skmsg subsystem where alloc_sk_msg() could be called from a non-sleepable context without proper gfp_t flags, potentially leading to memory corruption. This affects Linux systems with specific kernel configurations using skmsg functionality. Attackers could exploit this to cause kernel crashes or potentially execute arbitrary code.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Linux kernel versions before the fix commits (specific versions vary by distribution)
Operating Systems: Linux distributions using vulnerable kernel versions
Default Config Vulnerable: ✅ No
Notes: Only systems using skmsg functionality (typically with BPF or socket-related features) are affected. Many default configurations may not be 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 system crash, or potential privilege escalation to kernel-level code execution

🟠

Likely Case

System instability, kernel crashes, or denial of service

🟢

If Mitigated

Minimal impact with proper kernel hardening and isolation

🌐 Internet-Facing: MEDIUM - Requires specific network conditions and kernel configuration to be exploitable
🏢 Internal Only: LOW - Requires local access or specific network conditions within trusted environment

🎯 Exploit Status

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

Exploitation requires specific conditions and kernel configuration. The vulnerability was discovered through fuzzing (syzbot).

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Fixed in kernel commits 2d1f274b95c6e4ba6a813b3b8e7a1a38d54a0a08 and 693ddd6ffc05b228ea1638f9d757c5d3541f9446

Vendor Advisory: https://git.kernel.org/stable/c/2d1f274b95c6e4ba6a813b3b8e7a1a38d54a0a08

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing the fix commits. 2. Check your distribution's security advisories for specific patched versions. 3. Reboot system after kernel update.

🔧 Temporary Workarounds

Disable skmsg functionality

Linux

Disable BPF and socket-related features that use skmsg if not required

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

🧯 If You Can't Patch

  • Implement strict network segmentation to limit exposure
  • Apply kernel hardening measures and restrict unprivileged BPF operations

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if skmsg functionality is enabled. Vulnerable if using kernel before fix commits with skmsg features active.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes the fix commits: 'uname -r' and check distribution patch notes

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages
  • OOM killer activity
  • System crash dumps

Network Indicators:

  • Unusual socket behavior or connection failures

SIEM Query:

source="kernel" AND ("panic" OR "BUG" OR "slab" OR "skmsg")

🔗 References

📤 Share & Export