Vulnerability in Kernel: UAF for rx_kref of j1939_priv
Summary
GSD-2021-1002041: can: j1939: j1939_netdev_start(): fix UAF for rx_kref of j1939_priv. Affects Kernel versions >= 9d71dd0c70099914fcd063135da3c580865e924c, < 864e77771a24c877aaf53aee019f78619cbcd668. 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 critical component of the Linux operating system that provides core functionality and interfaces with hardware devices. It manages system resources, facilitates communication between software and hardware, and ensures the security and stability of the system. The vulnerability in question affects the j1939 module within the Kernel, which is responsible for supporting the J1939 protocol used in automotive applications. This vulnerability specifically relates to the j1939_netdev_start() function, which can lead to a use-after-free (UAF) issue with the rx_kref of j1939_priv.
Vulnerability Detail
The use-after-free vulnerability in j1939_netdev_start() can be exploited by an attacker to potentially execute arbitrary code or cause a denial-of-service (DoS) condition. The vulnerability arises due to improper handling of the rx_kref reference counter in the j1939_priv structure. By manipulating the reference counter, an attacker can trigger a UAF condition, leading to memory corruption and potential code execution. Successful exploitation of this vulnerability requires the attacker to have local access to the system or the ability to send specially crafted network packets.
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 disable the affected j1939 module if it is not required for their system. This can be achieved by blacklisting the module or preventing its automatic loading during system startup. However, it is important to note that disabling the j1939 module may impact the functionality of certain automotive applications that rely on the J1939 protocol.
Conclusion
The vulnerability in the Kernel's j1939 module poses a risk of arbitrary code execution or denial-of-service. It is crucial to update the Kernel to version v5.10.76 or later to mitigate this vulnerability. Alternatively, users can disable the j1939 module if it is not required, although this may impact certain automotive applications. For further assistance and support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The vulnerability can potentially allow an attacker to execute arbitrary code or cause a denial-of-service condition on a system running the affected version of the Kernel.
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 to the playground, and it will provide real-time alerts for open-source vulnerabilities, including this one.
Remote exploitation of this vulnerability is unlikely as it requires local access to the system or the ability to send specially crafted network packets.
There are no known instances of this vulnerability being exploited in the wild at the time of this report.
While updating the Kernel is the recommended solution, you can mitigate the risk by disabling the j1939 module if it is not necessary for your system. However, this may impact the functionality of certain automotive applications that rely on the J1939 protocol.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.