CVE-2025-38500
📋 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
- Linux kernel
📦 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.
🎯 Exploit Status
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
linuxPrevent 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
linuxRemove 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
- https://git.kernel.org/stable/c/5918c3f4800a3aef2173865e5903370f21e24f47
- https://git.kernel.org/stable/c/69a31f7a6a81f5ffd3812c442e09ff0be22960f1
- https://git.kernel.org/stable/c/a8d4748b954584ab7bd800f1a4e46d5b0eeb5ce4
- https://git.kernel.org/stable/c/a90b2a1aaacbcf0f91d7e4868ad6c51c5dee814b
- https://git.kernel.org/stable/c/bfebdb85496e1da21d3cf05de099210915c3e706
- https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html