Bluetooth: hci_serdev: call init_rwsem() before p->open() in Kernel
Summary
GSD-2022-1001553: Bluetooth: hci_serdev: call init_rwsem() before p->open(). Affects Kernel versions >= d73e172816652772114827abaa2dbc053eecbbd7, < 24608d8489cb3622f5ca968fb7996d193e4f9f81. 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 crucial component of the Linux operating system that provides core functionalities and acts as a bridge between hardware and software. It manages system resources, facilitates communication between different software components, and ensures the overall stability and security of the system. The hci_serdev module in the Kernel is responsible for handling Bluetooth communication over a serial device. It allows Bluetooth-enabled devices to connect and exchange data with the system. However, a vulnerability has been discovered in the hci_serdev module that could potentially be exploited by attackers.
Vulnerability Detail
The vulnerability in the hci_serdev module arises from a missing initialization of a read-write semaphore (init_rwsem) before calling the p->open() function. This oversight could lead to a race condition where multiple threads or processes attempt to access the same resource simultaneously, resulting in unexpected behavior or system crashes. An attacker could potentially exploit this vulnerability to gain unauthorized access to sensitive information, execute arbitrary code, or disrupt the normal functioning of the system. The vulnerability was introduced in version v4.16 of the Kernel and has been fixed in version v5.16.19.
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 temporary workaround, users can disable the hci_serdev module by blacklisting it. This can be achieved by adding the following line to the /etc/modprobe.d/blacklist.conf file:
blacklist hci_serdev
After adding the line, the system needs to be rebooted for the changes to take effect. However, it is important to note that disabling the hci_serdev module will prevent Bluetooth functionality from working until the vulnerability is fixed.
Conclusion
In conclusion, the hci_serdev module in the Kernel is vulnerable to a race condition due to a missing initialization of a read-write semaphore. This vulnerability could be exploited by attackers to gain unauthorized access, execute arbitrary code, or disrupt the system. It is recommended to update the Kernel to version v5.16.19 or later to fix the vulnerability. Alternatively, users can disable the hci_serdev module as a temporary workaround. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The vulnerability could potentially allow attackers to gain unauthorized access to sensitive information, execute arbitrary code, or disrupt the normal functioning of the 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.
Yes, a patch for this vulnerability is available in version v5.16.19 of the Kernel. It is recommended to update to this version or later to fix the vulnerability.
As a temporary workaround, you can disable the hci_serdev module by blacklisting it. However, this will disable Bluetooth functionality until the vulnerability is fixed.
You can find more information about this vulnerability in the official Linux Kernel repository (https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/) and the vulnerability database maintained by the Cloud Security Alliance (https://github.com/cloudsecurityalliance/gsd-database).
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.