CVE-2022-48839

5.5 MEDIUM

📋 TL;DR

A memory corruption vulnerability in the Linux kernel's AF_PACKET socket implementation allows local attackers to trigger slab-out-of-bounds access. When using PACKET_COPY_THRESH with mmap operations, uninitialized memory in skb->cb[] can be copied to userspace, potentially leaking kernel memory or causing crashes. This affects Linux systems with AF_PACKET sockets enabled.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Kernel versions before the fix commits (specific versions vary by distribution)
Operating Systems: Linux distributions using vulnerable kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Requires AF_PACKET sockets to be used with PACKET_COPY_THRESH and mmap operations. Most distributions have AF_PACKET enabled by default.

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

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 memory disclosure leading to information leakage, potential privilege escalation if combined with other vulnerabilities, or kernel panic causing system instability.

🟠

Likely Case

Information disclosure of kernel memory contents to local users, potentially revealing sensitive data or system information.

🟢

If Mitigated

Limited impact if AF_PACKET sockets are not used or restricted via capabilities/namespaces.

🌐 Internet-Facing: LOW - Requires local access to exploit, not directly exploitable over network.
🏢 Internal Only: MEDIUM - Local users can potentially exploit this to leak kernel memory or cause denial of service.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Syzbot discovered and reported this vulnerability. Exploitation requires local access and specific AF_PACKET socket configuration.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Fixed in kernel commits: 268dcf1f7b3193bc446ec3d14e08a240e9561e4d and related stable backports

Vendor Advisory: https://git.kernel.org/stable/c/268dcf1f7b3193bc446ec3d14e08a240e9561e4d

Restart Required: Yes

Instructions:

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

🔧 Temporary Workarounds

Restrict AF_PACKET socket usage

linux

Limit creation of AF_PACKET sockets using capabilities or namespaces

# Use capabilities: setcap -r /bin/ping
# Use namespaces: unshare -n

Disable unnecessary network protocols

linux

Remove AF_PACKET module if not needed

# Blacklist packet module: echo 'blacklist packet' >> /etc/modprobe.d/blacklist.conf
# Rebuild initramfs if needed

🧯 If You Can't Patch

  • Implement strict access controls to prevent unauthorized users from creating AF_PACKET sockets
  • Monitor for unusual AF_PACKET socket usage and investigate any unauthorized creation attempts

🔍 How to Verify

Check if Vulnerable:

Check kernel version and compare with distribution's patched versions. Vulnerable if using kernel before fix commits.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version is updated to patched version and check that the specific git commits are included in your kernel build.

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic logs
  • KASAN reports of slab-out-of-bounds access in packet_recvmsg
  • Unusual AF_PACKET socket creation

Network Indicators:

  • Local socket creation attempts for AF_PACKET protocol

SIEM Query:

process:name="syz-executor" OR kernel_log:"KASAN: stack-out-of-bounds" OR kernel_log:"packet_recvmsg"

🔗 References

📤 Share & Export