Critical Vulnerability in Linux Kernel: Exposure of Hardware Counters in Non-Init Net Namespace
Summary
CVE-2025-22089: In the Linux kernel, the following vulnerability has been resolved: RDMA/core: Don't expose hw_counters outside of init net namespace Commit 467f432a521a ("RDMA/core: Split port and device counter sysfs attributes") acci... Affects linux versions < 6.1.135-1. Fixed in 6.1.135-1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The Linux kernel is the core component of many operating systems, providing essential services for all other parts of the system. It manages hardware resources, system calls, and process management. The kernel is highly modular, allowing for various functionalities through loadable modules. This vulnerability specifically affects the RDMA/core subsystem, which is responsible for Remote Direct Memory Access, enabling high-throughput and low-latency networking. The vulnerability arises from an accidental exposure of hardware counters to non-initial network namespaces, which could lead to system crashes.
Vulnerability Detail
In the Linux kernel, a vulnerability was introduced in commit 467f432a521a, where hardware counters were almost exposed to non-init network namespaces. Although the counters were not fully accessible, attempting to read them resulted in a kernel NULL pointer dereference, leading to a crash. The issue stems from incorrect casting of device pointers, causing memory corruption. This vulnerability poses significant risks as it can lead to system instability and crashes when exploited.
How To Fix
Minimum fixed version
6.1.135-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade linux
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, avoid accessing the hardware counters in non-init network namespaces. You can do this by not executing the following commands in such namespaces: ip netns add foo; ip netns exec foo bash; cat /sys/class/infiniband/mlx4_0/hw_counters/*.
Conclusion
The vulnerability CVE-2025-22089 in the Linux kernel poses significant risks by exposing hardware counters to non-init network namespaces, potentially leading to system crashes. It is crucial to update to the latest patched version of the Linux package to mitigate these risks. Users should also consider using Vulert to monitor for vulnerabilities in their applications.
See every vulnerability recorded for linux →
FAQ
The vulnerability can lead to system crashes and instability when hardware counters are accessed in non-init network namespaces.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
The vulnerability affects Linux packages in Debian 12 and 13.
Yes, updating to the latest patched version of the Linux package will resolve the vulnerability.
If you cannot update immediately, avoid accessing the hardware counters in non-init network namespaces as a temporary workaround.
Related vulnerabilities
Recent vulnerabilities recorded for linux.