CVE-2025-38500

7.8 HIGH

📋 TL;DR

A use-after-free vulnerability in the Linux kernel's xfrm interface subsystem allows local attackers to cause a kernel panic (denial of service) or potentially execute arbitrary code. The vulnerability occurs when attempting to modify collect_md xfrm interfaces after creation, leading to double-free conditions during network namespace cleanup. This affects systems using xfrm interfaces with collect_md enabled.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Versions before the fix commits (specific versions vary by distribution)
Operating Systems: Linux distributions using vulnerable kernel versions
Default Config Vulnerable: ✅ No
Notes: Only affects systems using xfrm interfaces with collect_md property enabled. Requires CAP_NET_ADMIN capability to trigger.

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

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, with potential for local privilege escalation to kernel-level code execution.

🟠

Likely Case

Kernel panic and system crash when network namespace cleanup occurs, causing denial of service.

🟢

If Mitigated

No impact if proper access controls prevent local users from modifying xfrm interfaces.

🌐 Internet-Facing: LOW - This is a local vulnerability requiring access to the system.
🏢 Internal Only: MEDIUM - Local users or processes with CAP_NET_ADMIN capabilities can trigger this vulnerability.

🎯 Exploit Status

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

Requires local access and CAP_NET_ADMIN capabilities. The vulnerability is triggered through specific xfrm interface modification operations.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Fixed in kernel commits: 5918c3f4800a3aef2173865e5903370f21e24f47, 69a31f7a6a81f5ffd3812c442e09ff0be22960f1, a8d4748b954584ab7bd800f1a4e46d5b0eeb5ce4, a90b2a1aaacbcf0f91d7e4868ad6c51c5dee814b, bfebdb85496e1da21d3cf05de099210915c3e706

Vendor Advisory: https://git.kernel.org/stable/c/5918c3f4800a3aef2173865e5903370f21e24f47

Restart Required: Yes

Instructions:

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

🔧 Temporary Workarounds

Restrict xfrm interface modifications

linux

Prevent users from modifying xfrm interfaces by restricting CAP_NET_ADMIN capabilities

# Use Linux capabilities to restrict access
# Example: Remove CAP_NET_ADMIN from non-privileged users
setcap -r /path/to/application
# Or use SELinux/AppArmor to restrict network operations

Disable xfrm interfaces if not needed

linux

Remove or disable xfrm interfaces that use collect_md property

# List xfrm interfaces
ip link show type xfrm
# Remove unnecessary xfrm interfaces
ip link delete xfrmi0
# Or prevent creation via kernel module blacklist if not needed

🧯 If You Can't Patch

  • Implement strict access controls to prevent local users from having CAP_NET_ADMIN capabilities
  • Monitor for kernel panic events and xfrm interface modification attempts in system logs

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if xfrm interfaces with collect_md are present: 'ip link show type xfrm' and 'uname -r'

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes the fix commits or is newer than vulnerable versions. Check with 'uname -r' and compare with distribution security advisories.

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages mentioning 'unregister_netdevice_many_notify'
  • OOPs messages with xfrm interface references
  • Network namespace cleanup errors

Network Indicators:

  • Unexpected system crashes during network operations
  • Network interface disappearance

SIEM Query:

source="kernel" AND ("unregister_netdevice_many_notify" OR "xfrm" OR "collect_md")

🔗 References

📤 Share & Export