CVE-2025-21670

5.5 MEDIUM

📋 TL;DR

A NULL pointer dereference vulnerability in the Linux kernel's vsock/bpf subsystem allows local attackers to cause a kernel panic (denial of service) by triggering a failed vsock connection and then attempting to receive data. This affects systems with vsock sockets and BPF enabled, primarily Linux servers and containers.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Kernel versions before fixes in stable releases (specific versions in git commits)
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Requires vsock sockets and BPF functionality to be present and used. Common in container environments and virtualization setups.

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

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 and denial of service, potentially disrupting critical services.

🟠

Likely Case

Local denial of service through kernel crash, requiring system reboot to recover.

🟢

If Mitigated

Minimal impact with proper access controls limiting local user privileges.

🌐 Internet-Facing: LOW - Requires local access to exploit, not remotely exploitable.
🏢 Internal Only: MEDIUM - Local users or compromised containers could cause system instability.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW - Simple local program to trigger failed connection and recvmsg.

Exploitation requires local access and ability to create vsock sockets. No privilege escalation demonstrated.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Patched in kernel stable releases via commits: 58e586c30d0b6f5dc0174a41026f2b0a48c9aab6, 6771e1279dadf1d92a72e1465134257d9e6f2459, f6abafcd32f9cfc4b1a2f820ecea70773e26d423

Vendor Advisory: https://git.kernel.org/stable/c/58e586c30d0b6f5dc0174a41026f2b0a48c9aab6

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version from your distribution. 2. Reboot system to load new kernel. 3. Verify kernel version matches patched release.

🔧 Temporary Workarounds

Disable vsock module

linux

Prevent loading of vsock kernel module if not required

echo 'install vsock /bin/false' >> /etc/modprobe.d/disable-vsock.conf
rmmod vsock 2>/dev/null || true

Restrict BPF system calls

linux

Limit BPF functionality using seccomp or kernel parameters

sysctl -w kernel.unprivileged_bpf_disabled=1

🧯 If You Can't Patch

  • Implement strict access controls to limit local user privileges
  • Use container security policies to restrict vsock and BPF capabilities

🔍 How to Verify

Check if Vulnerable:

Check kernel version and compare with patched releases from your distribution. Test by attempting to reproduce crash with vsock program.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes the fix commits. Test vsock functionality to ensure no crashes occur.

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages in /var/log/kern.log or dmesg
  • NULL pointer dereference errors with vsock_bpf_recvmsg in stack traces

Network Indicators:

  • Unusual vsock connection attempts from local processes

SIEM Query:

source="kernel" AND "NULL pointer dereference" AND "vsock"

🔗 References

📤 Share & Export