PT-2021-8006 · Linux+1 · Linux Kernel+1

Published

2021-03-16

·

Updated

2024-12-06

·

CVE-2021-47038

CVSS v3.1

5.5

Medium

VectorAV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Name of the Vulnerable Software and Affected Versions Linux kernel versions prior to 5.12.0-rc1-00026-g73d464503354
Description The issue is related to a potential deadlock between the hci dev->lock and socket lock in the Linux kernel's Bluetooth functionality. This deadlock can occur due to a dependency between the socket lock and hci dev->lock that was introduced by a commit adding a BT PHY socket option. The function hci conn get phy() does not rely on hdev being immutable during its runtime and does not access any members of hdev, making it unnecessary to hold the lock. This fixes a lockdep splat warning about a possible circular locking dependency detected.
Recommendations To resolve this issue, update the Linux kernel to a version that includes the fix for the deadlock between hci dev->lock and socket lock. Specifically, ensure that the kernel version is 5.12.0-rc1-00026-g73d464503354 or later. If updating the kernel is not feasible, consider applying the patch from the commit eab2404ba798 ("Bluetooth: Add BT PHY socket option") to avoid the deadlock. As a temporary workaround, consider disabling the hci conn get phy() function until a patch is available.

Fix

Improper Locking

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

BDU:2024-01763
CVE-2021-47038
OPENSUSE-SU-2024_1489-1
SUSE-SU-2024:1465-1
SUSE-SU-2024:1489-1

Affected Products

Linux Kernel
Suse