NFC: NULL out the dev->rfkill to prevent UAF in Kernel
Summary
GSD-2022-1002795: NFC: NULL out the dev->rfkill to prevent UAF. Affects Kernel versions >= 3e3b5dfcd16a3e254aab61bd1e8c417dd4503102, < 4f5d71930f41be78557f9714393179025baacd65. 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 acts as a bridge between hardware and software. It provides essential services and functions to enable the proper functioning of various hardware devices and software applications. The NFC (Near Field Communication) subsystem in the Kernel allows devices to communicate wirelessly over short distances. It is commonly used for contactless payments, data transfer, and other applications. However, a vulnerability has been discovered in the NFC subsystem that could lead to a Use-After-Free (UAF) issue.
Vulnerability Detail
The vulnerability in the NFC subsystem arises from a failure to properly handle a specific scenario, which can result in a Use-After-Free (UAF) condition. This vulnerability could potentially be exploited by an attacker to execute arbitrary code or cause a denial-of-service (DoS) situation. The issue was introduced in version v5.16 of the Linux Kernel and was fixed in version v5.18.3. The vulnerability is tracked with the ID GSD-2022-1002795.
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
If updating the Kernel is not immediately feasible, a temporary workaround can be implemented by nulling out the 'dev->rfkill' variable in the affected code. This can help prevent the UAF condition from occurring. However, it is important to note that this workaround is not a permanent solution and should be used only as a temporary measure until the Kernel can be updated.
Conclusion
The NFC subsystem in the Linux Kernel is vulnerable to a Use-After-Free (UAF) issue, which could potentially be exploited by attackers. It is crucial to update the Kernel to version v5.18.3 or later to mitigate this vulnerability. In the meantime, a temporary workaround can be applied by nulling out the 'dev->rfkill' variable in the affected code. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The NFC subsystem in the Linux Kernel enables wireless communication between devices over short distances. It is commonly used for contactless payments, data transfer, and other applications.
A Use-After-Free (UAF) vulnerability occurs when a program or system continues to use a memory reference after it has been freed. This can lead to unpredictable behavior and potential security issues.
Exploiting this vulnerability could allow an attacker to execute arbitrary code or cause a denial-of-service (DoS) situation. The exact impact may vary depending on the specific system configuration and the attacker's capabilities.
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 NFC subsystem UAF issue.
For more detailed information about this vulnerability, including the specific code changes and references, you can refer to the vulnerability database entry at https://github.com/cloudsecurityalliance/gsd-database/blob/main/2022/1002xxx/GSD-2022-1002795.json.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.