UAF Vulnerability in j1939_netdev_start() of Kernel
Summary
GSD-2021-1002169: can: j1939: j1939_netdev_start(): fix UAF for rx_kref of j1939_priv. Affects Kernel versions >= 9d71dd0c70099914fcd063135da3c580865e924c, < d9d52a3ebd284882f5562c88e55991add5d01586. 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 Kernel is a crucial component of the Linux operating system that manages communication between hardware and software. It provides essential services and functions for the system's operation. The j1939_netdev_start() function is part of the Controller Area Network (CAN) subsystem in the Kernel, specifically related to the J1939 protocol. This protocol is commonly used in heavy-duty vehicles for communication between electronic control units (ECUs). The j1939_netdev_start() function is responsible for initializing the network device for J1939 communication.
Vulnerability Detail
The vulnerability identified as GSD-2021-1002169 in the j1939_netdev_start() function can lead to a Use-After-Free (UAF) condition. This occurs when the function fails to properly handle the reference count of the receive kernel object (rx_kref) in the j1939_priv structure. An attacker could exploit this vulnerability by sending specially crafted network packets, causing the reference count to be freed prematurely. This could result in a crash or potentially allow the attacker to execute arbitrary code with kernel privileges. The vulnerability was introduced in version v5.4 of the Linux Kernel and has been fixed in version v5.15.
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 apply patches or backport the fix to their current Kernel version. However, it is strongly advised to update to the latest stable version to benefit from other security enhancements and bug fixes.
Conclusion
The UAF vulnerability in the j1939_netdev_start() function of the Kernel can have severe consequences, including system crashes and potential arbitrary code execution. It is crucial to update the Linux Kernel to version v5.15 or later to address this vulnerability. Applying patches or backporting the fix can provide temporary mitigation, but updating to the latest stable version is highly recommended. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The vulnerability can lead to a Use-After-Free condition, potentially resulting in a system crash or allowing an attacker to execute arbitrary code with kernel privileges.
You can use the Vulert Playground at Vulert Scanner to check if your system is affected by this vulnerability. Simply upload your package-lock.json file, and Vulert will analyze it for any open-source vulnerabilities, including this one.
At the time of this report, there is no known public exploit for this vulnerability. However, it is essential to apply the fix promptly to mitigate any potential risks.
Yes, this vulnerability can be exploited remotely by sending specially crafted network packets to the affected system.
If updating to the latest Kernel version is not immediately feasible, you can apply patches or backport the fix to your current Kernel version. However, it is strongly recommended to update to the latest stable version as soon as possible.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.