Vulnerability in Kernel: UAF for rx_kref of j1939_priv
Summary
GSD-2021-1001884: can: j1939: j1939_netdev_start(): fix UAF for rx_kref of j1939_priv. Affects Kernel versions >= 9d71dd0c70099914fcd063135da3c580865e924c, < 6e8811707e2df0c6ba920f0cad3a3bca7b42132f. 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 functionalities and manages system resources. It acts as an interface between the hardware and software layers, facilitating communication and coordination between various components. The vulnerability in question affects the j1939 module within the Kernel, which is responsible for handling the J1939 protocol used in automotive applications. This vulnerability specifically impacts the j1939_netdev_start() function, leading to a use-after-free (UAF) issue with the rx_kref of j1939_priv. This vulnerability was introduced in version v5.4 of the Linux Kernel and has been fixed in version v5.14.15.
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 this reference counter, an attacker can trigger a use-after-free condition, leading to memory corruption and potentially allowing them to gain control over the affected system. 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 j1939 module if it is not required for their system. This can be achieved by blacklisting the j1939 module or removing it from the Kernel configuration. However, it is important to note that disabling the j1939 module may impact the functionality of certain automotive-related 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 attacks. It is crucial to update the Linux Kernel to version v5.14.15 or later to mitigate this vulnerability. Alternatively, users can disable the j1939 module if it is not required, although this may impact certain automotive-related applications. Regularly updating the Kernel and following best security practices are essential to ensure a secure and reliable system. For further support on vulnerability remediation, you can reach out to 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 the affected system.
You can use the Vulert Playground (https://vulert.com/scanner) to check if your system is affected by this vulnerability. Simply upload your package-lock.json file to the playground, and it will analyze the dependencies and alert you if any vulnerabilities are found.
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 this time.
If you are unable to update to the fixed version immediately, it is recommended to implement the provided workaround and take additional security measures such as restricting network access and monitoring for any suspicious activity.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.