UAF Vulnerability in j1939_netdev_start() of Kernel
Summary
UVI-2021-1002004: can: j1939: j1939_netdev_start(): fix UAF for rx_kref of j1939_priv. Affects Kernel versions >= 9d71dd0c70099914fcd063135da3c580865e924c, < a0e47d2833b4f65e6c799f28c6b636d36b8b936d. 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 fundamental component of the Linux operating system that provides core functionalities and interfaces with hardware devices. It manages various aspects of system operation, including memory management, process scheduling, and device drivers. The j1939_netdev_start() function is part of the Controller Area Network (CAN) subsystem in the Kernel, specifically designed for J1939 protocol support. This protocol is commonly used in automotive and industrial applications for communication between electronic control units (ECUs). The j1939_priv structure represents the private data associated with a J1939 network device. This vulnerability affects the rx_kref field of the j1939_priv structure, leading to a use-after-free (UAF) vulnerability.
Vulnerability Detail
The UAF vulnerability in j1939_netdev_start() occurs when the rx_kref field of the j1939_priv structure is not properly handled. This can be exploited by an attacker to manipulate the reference count of the rx_kref object, leading to a use-after-free condition. By carefully crafting malicious network packets, an attacker could trigger this vulnerability and potentially execute arbitrary code or cause a denial-of-service (DoS) condition. The impact and attack plausibility of this vulnerability have not been proven yet.
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 the patch manually to their Kernel source code if updating to the latest version is not feasible. The patch can be obtained from the commit a0e47d2833b4f65e6c799f28c6b636d36b8b936d. Users can follow the standard procedure for applying patches to the Kernel source code.
Conclusion
The UAF vulnerability in j1939_netdev_start() of the Kernel can potentially be exploited to execute arbitrary code or cause a DoS condition. It is crucial to update the Kernel to version v5.4.156 or later to mitigate this vulnerability. If updating is not feasible, users can apply the patch manually. For further support on vulnerability remediation, you can contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The impact of this vulnerability is not yet proven. However, if successfully exploited, it could allow an attacker to execute arbitrary code or cause a denial-of-service (DoS) condition.
You can use Vulert's playground (https://vulert.com/scanner) to check if your system is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities without requiring access to the code or installation.
Yes, the fix for this vulnerability is available in Linux Kernel version v5.4.156 or later. It is recommended to update the Kernel to the latest stable version to mitigate the vulnerability.
Yes, users can apply the patch manually to their Kernel source code if updating to the latest version is not feasible. The patch can be obtained from the commit a0e47d2833b4f65e6c799f28c6b636d36b8b936d.
You can refer to the vulnerability details in the Open Source Vulnerability format provided by Vulert. The details include the commit references and links to the relevant source code.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.