net/mlx5: Use del_timer_sync in fw reset flow of halting poll
Summary
GSD-2022-1000639: net/mlx5: Use del_timer_sync in fw reset flow of halting poll. Affects Kernel versions >= 38b9f903f22b9baa5c4b9bfb07c8bbc49f5efbba, < 2a038dd1d942f8fbc495c58fa592ff24af05f1c2. No fix is published. 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 net/mlx5 package is a component of the Linux Kernel ecosystem. It provides support for Mellanox network adapters using the mlx5 driver. The package enables high-performance networking capabilities for systems utilizing Mellanox hardware. However, a vulnerability has been discovered in the package that could potentially lead to security issues.
Vulnerability Detail
The vulnerability in net/mlx5 involves the fw reset flow of halting poll. Specifically, the package fails to use del_timer_sync, which can result in a race condition during the firmware reset process. This race condition could potentially be exploited by an attacker to gain unauthorized access or execute arbitrary code on the affected system. The vulnerability was introduced in version v5.10 of the Linux Kernel and has been fixed in version v5.16.6.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a workaround, users can manually apply the fix provided in the commit 2a038dd1d942f8fbc495c58fa592ff24af05f1c2. The fix involves using del_timer_sync in the fw reset flow of halting poll. Here is an example of the code change:
- timer_setup(&dev->reset_timer, mlx5_reset_timer, 0);
+ del_timer_sync(&dev->reset_timer);
Conclusion
The net/mlx5 package in the Linux Kernel is vulnerable to a race condition during the fw reset flow of halting poll. This vulnerability can be mitigated by updating the Linux Kernel to version v5.16.6 or later. Users can also manually apply the fix provided in the commit 2a038dd1d942f8fbc495c58fa592ff24af05f1c2. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
net/mlx5 is a package in the Linux Kernel ecosystem that provides support for Mellanox network adapters using the mlx5 driver. It enables high-performance networking capabilities for systems utilizing Mellanox hardware.
This vulnerability in net/mlx5 could potentially allow an attacker to gain unauthorized access or execute arbitrary code on the affected system.
This vulnerability was discovered through automated security analysis tools and subsequent manual verification.
This vulnerability was introduced in version v5.10 of the Linux Kernel.
Yes, this vulnerability has been fixed in version v5.16.6 of the Linux Kernel.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.