Bluetooth: hci_serdev: call init_rwsem() before p->open() - Kernel
Summary
GSD-2022-1001243: Bluetooth: hci_serdev: call init_rwsem() before p->open(). Affects Kernel versions >= d73e172816652772114827abaa2dbc053eecbbd7, < c6049161291737242d5a008bd8ebe0409b175a43. 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 includes various subsystems, including Bluetooth, which enables wireless communication between devices. The hci_serdev module in the Kernel is responsible for handling Bluetooth communication over a serial device. 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 call to the init_rwsem() function before the p->open() function. This omission can lead to a race condition where multiple threads can access the same resource simultaneously, potentially resulting in data corruption or other security issues. An attacker could exploit this vulnerability to gain unauthorized access to sensitive information or execute arbitrary code on a vulnerable system. The vulnerability was introduced in version v4.16 of the Linux Kernel and has been fixed in version v5.17.2.
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 this workaround will disable Bluetooth functionality until the vulnerability is properly fixed.
Conclusion
The Bluetooth hci_serdev vulnerability in the Kernel can potentially allow attackers to gain unauthorized access or execute arbitrary code on affected systems. It is crucial to update the Linux Kernel to version v5.17.2 or later to mitigate this vulnerability. Alternatively, users can apply the temporary workaround of blacklisting the hci_serdev module, but this will disable Bluetooth functionality. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
This vulnerability can potentially allow attackers to gain unauthorized access to sensitive information or execute arbitrary code on a vulnerable 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 and the Vulert Playground will analyze it for any known vulnerabilities.
Yes, a patch for this vulnerability has been released in version v5.17.2 of the Linux Kernel. It is recommended to update to this version or later to fix the vulnerability.
Yes, you can apply the temporary workaround mentioned in the 'workaround' section of this report. However, it is important to note that this workaround will disable Bluetooth functionality until the vulnerability is properly 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 Cloud Security Alliance GSD database (https://github.com/cloudsecurityalliance/gsd-database).
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.