Vulnerability in Kernel package: nfc: nci: add flush_workqueue to prevent uaf
Summary
GSD-2022-1001957: nfc: nci: add flush_workqueue to prevent uaf. Affects Kernel versions >= 6a2968aaf50c7a22fced77a5e24aa636281efca8, < 67677050cecbe0edfdd81cd508415e9636ba7c65. 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 package is an essential component of the Linux operating system. It provides the core functionality and acts as a bridge between hardware and software. The nfc (Near Field Communication) subsystem within the Kernel enables communication between devices in close proximity. It allows for contactless data exchange and is commonly used for applications like mobile payments and access control. However, a vulnerability has been discovered in the nfc subsystem, specifically in the nci module. This vulnerability could lead to a use-after-free (UAF) condition, potentially allowing an attacker to execute arbitrary code or cause a denial of service.
Vulnerability Detail
The vulnerability arises from a missing flush_workqueue call in the nci module of the nfc subsystem. This omission can result in a use-after-free scenario, where a pointer to a freed object is still accessible and can be manipulated by an attacker. By exploiting this vulnerability, an attacker may be able to execute arbitrary code with kernel privileges or trigger a system crash. The impact and attack plausibility of this vulnerability have not been proven yet, but it is important to address it to ensure the security and stability of the system.
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 this vulnerability has been fixed in the latest version of the Kernel, applying the update is the recommended solution. However, if updating is not immediately feasible, a potential workaround could involve manually adding the missing flush_workqueue call to the affected code. Here is an example of how the code modification could be done:
--- a/drivers/nfc/nci/uart.c
+++ b/drivers/nfc/nci/uart.c
@@ -123,6 +123,7 @@ static void nci_uart_flush(struct nci_uart *nu)
flush_work(&nu->work);
flush_work(&nu->tx_work);
flush_work(&nu->rx_work);
+ flush_workqueue(nu->workqueue);
}
Please note that this workaround should be considered temporary, and it is strongly advised to update to the latest Kernel version as soon as possible.
Conclusion
In conclusion, a vulnerability has been identified in the Kernel package's nfc subsystem, specifically in the nci module. This vulnerability could lead to a use-after-free condition, potentially enabling an attacker to execute arbitrary code or cause a denial of service. It is crucial to update the Kernel to the latest version (v5.10.112 or later) to address this vulnerability. If immediate updating is not feasible, a temporary workaround involving code modification can be applied. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The Kernel package is a crucial component of the Linux operating system. It provides the core functionality and acts as a bridge between hardware and software.
The nfc (Near Field Communication) subsystem enables communication between devices in close proximity. It allows for contactless data exchange and is commonly used for applications like mobile payments and access control.
A use-after-free vulnerability occurs when a program continues to use a pointer to an object after it has been freed from memory. This can lead to unpredictable behavior and potential security issues.
If exploited, this vulnerability could allow an attacker to execute arbitrary code with kernel privileges or cause a denial of service. However, the actual impact and attack plausibility have not been proven yet.
To fix this vulnerability, it is recommended to update the Linux Kernel to version v5.10.112 or later, where the necessary fix has been implemented.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.