CVE-2021-47038
publishedBluetooth: avoid deadlock between hci_dev->lock and socket lock
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linuxeab2404ba798a8efda2a970f44071c3406d94e57 to < 7cc0ba67883c6c8d3bddb283f56c167fc837a555 · eab2404ba798a8efda2a970f44071c3406d94e57 to < fee71f480bc1dec5f6ae3b0b185ff12a62bceabc · eab2404ba798a8efda2a970f44071c3406d94e57 to < 332e69eb3bd90370f2d9f2c2ca7974ff523dea17 · eab2404ba798a8efda2a970f44071c3406d94e57 to < 17486960d79b900c45e0bb8fbcac0262848582ba · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux5.7 (affected) · 0 to < 5.7 (unaffected · semver) · 5.10.37 through 5.10.* (unaffected · semver) · 5.11.21 through 5.11.* (unaffected · semver) · 5.12.4 through 5.12.* (unaffected · semver) · 5.13 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| SUSE / openSUSE | SLE-15-SP3 | cluster-md-kmp-defaultaarch64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | cluster-md-kmp-defaultppc64le | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | cluster-md-kmp-defaults390x | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | cluster-md-kmp-defaultx86_64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
Show 64 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SUSE / openSUSE | SLE-15-SP3 | dlm-kmp-defaultaarch64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | dlm-kmp-defaultppc64le | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | dlm-kmp-defaults390x | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | dlm-kmp-defaultx86_64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | gfs2-kmp-defaultaarch64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | gfs2-kmp-defaultppc64le | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | gfs2-kmp-defaults390x | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | gfs2-kmp-defaultx86_64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-64kbaarch64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-64kb-develaarch64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-defaultaarch64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-defaultppc64le | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-defaults390x | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-defaultx86_64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-default-baseaarch64 | Advisory build | 5.3.18-150300.59.158.1.150300.18.92.5 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-default-baseppc64le | Advisory build | 5.3.18-150300.59.158.1.150300.18.92.5 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-default-bases390x | Advisory build | 5.3.18-150300.59.158.1.150300.18.92.5 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-default-basex86_64 | Advisory build | 5.3.18-150300.59.158.1.150300.18.92.5 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-default-develaarch64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-default-develppc64le | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-default-devels390x | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-default-develx86_64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-default-livepatchppc64le | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-default-livepatchs390x | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-default-livepatchx86_64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-default-livepatch-develppc64le | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-default-livepatch-devels390x | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-default-livepatch-develx86_64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-develnoarch | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-docsnoarch | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-livepatch-5_3_18-150300_59_158-defaultppc64le | Advisory build | 1-150300.7.3.5 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-livepatch-5_3_18-150300_59_158-defaults390x | Advisory build | 1-150300.7.3.5 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-livepatch-5_3_18-150300_59_158-defaultx86_64 | Advisory build | 1-150300.7.3.5 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-macrosnoarch | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-obs-buildaarch64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-obs-buildppc64le | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-obs-builds390x | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-obs-buildx86_64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-preemptaarch64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-preemptx86_64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-preempt-develaarch64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-preempt-develx86_64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-sourcenoarch | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-symsaarch64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-symsppc64le | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-symss390x | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-symsx86_64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | kernel-zfcpdumps390x | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | ocfs2-kmp-defaultaarch64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | ocfs2-kmp-defaultppc64le | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | ocfs2-kmp-defaults390x | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | ocfs2-kmp-defaultx86_64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | reiserfs-kmp-defaultaarch64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | reiserfs-kmp-defaultppc64le | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | reiserfs-kmp-defaults390x | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-15-SP3 | reiserfs-kmp-defaultx86_64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-5 | kernel-defaultaarch64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-5 | kernel-defaults390x | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-5 | kernel-defaultx86_64 | Advisory build | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-5 | kernel-default-baseaarch64 | Advisory build | 5.3.18-150300.59.158.1.150300.18.92.5 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-5 | kernel-default-bases390x | Advisory build | 5.3.18-150300.59.158.1.150300.18.92.5 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-5 | kernel-default-basex86_64 | Advisory build | 5.3.18-150300.59.158.1.150300.18.92.5 | SUSE-SU-2024:1489-1 |
| SUSE / openSUSE | SLE-5 | kernel-rtx86_64 | Advisory build | 5.3.18-150300.166.1 | SUSE-SU-2024:1465-1 |
| SUSE / openSUSE | SLE-5 | kernel-source-rtnoarch | Advisory build | 5.3.18-150300.166.1 | SUSE-SU-2024:1465-1 |
Description
In the Linux kernel, the following vulnerability has been resolved: Bluetooth: avoid deadlock between hci_dev->lock and socket lock Commit eab2404ba798 ("Bluetooth: Add BT_PHY socket option") added a dependency between socket lock and hci_dev->lock that could lead to deadlock. It turns out that hci_conn_get_phy() is not in any way relying on hdev being immutable during the runtime of this function, neither does it even look at any of the members of hdev, and as such there is no need to hold that lock. This fixes the lockdep splat below: ====================================================== WARNING: possible circular locking dependency detected 5.12.0-rc1-00026-g73d464503354 #10 Not tainted ------------------------------------------------------ bluetoothd/1118 is trying to acquire lock: ffff8f078383c078 (&hdev->lock){+.+.}-{3:3}, at: hci_conn_get_phy+0x1c/0x150 [bluetooth] but task is already holding lock: ffff8f07e831d920 (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+.}-{0:0}, at: l2cap_sock_getsockopt+0x8b/0x610 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+.}-{0:0}: lock_sock_nested+0x72/0xa0 l2cap_sock_ready_cb+0x18/0x70 [bluetooth] l2cap_config_rsp+0x27a/0x520 [bluetooth] l2cap_sig_channel+0x658/0x1330 [bluetooth] l2cap_recv_frame+0x1ba/0x310 [bluetooth] hci_rx_work+0x1cc/0x640 [bluetooth] process_one_work+0x244/0x5f0 worker_thread+0x3c/0x380 kthread+0x13e/0x160 ret_from_fork+0x22/0x30 -> #2 (&chan->lock#2/1){+.+.}-{3:3}: __mutex_lock+0xa3/0xa10 l2cap_chan_connect+0x33a/0x940 [bluetooth] l2cap_sock_connect+0x141/0x2a0 [bluetooth] __sys_connect+0x9b/0xc0 __x64_sys_connect+0x16/0x20 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae -> #1 (&conn->chan_lock){+.+.}-{3:3}: __mutex_lock+0xa3/0xa10 l2cap_chan_connect+0x322/0x940 [bluetooth] l2cap_sock_connect+0x141/0x2a0 [bluetooth] __sys_connect+0x9b/0xc0 __x64_sys_connect+0x16/0x20 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae -> #0 (&hdev->lock){+.+.}-{3:3}: __lock_acquire+0x147a/0x1a50 lock_acquire+0x277/0x3d0 __mutex_lock+0xa3/0xa10 hci_conn_get_phy+0x1c/0x150 [bluetooth] l2cap_sock_getsockopt+0x5a9/0x610 [bluetooth] __sys_getsockopt+0xcc/0x200 __x64_sys_getsockopt+0x20/0x30 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae other info that might help us debug this: Chain exists of: &hdev->lock --> &chan->lock#2/1 --> sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP); lock(&chan->lock#2/1); lock(sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP); lock(&hdev->lock); *** DEADLOCK *** 1 lock held by bluetoothd/1118: #0: ffff8f07e831d920 (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+.}-{0:0}, at: l2cap_sock_getsockopt+0x8b/0x610 [bluetooth] stack backtrace: CPU: 3 PID: 1118 Comm: bluetoothd Not tainted 5.12.0-rc1-00026-g73d464503354 #10 Hardware name: LENOVO 20K5S22R00/20K5S22R00, BIOS R0IET38W (1.16 ) 05/31/2017 Call Trace: dump_stack+0x7f/0xa1 check_noncircular+0x105/0x120 ? __lock_acquire+0x147a/0x1a50 __lock_acquire+0x147a/0x1a50 lock_acquire+0x277/0x3d0 ? hci_conn_get_phy+0x1c/0x150 [bluetooth] ? __lock_acquire+0x2e1/0x1a50 ? lock_is_held_type+0xb4/0x120 ? hci_conn_get_phy+0x1c/0x150 [bluetooth] __mutex_lock+0xa3/0xa10 ? hci_conn_get_phy+0x1c/0x150 [bluetooth] ? lock_acquire+0x277/0x3d0 ? mark_held_locks+0x49/0x70 ? mark_held_locks+0x49/0x70 ? hci_conn_get_phy+0x1c/0x150 [bluetooth] hci_conn_get_phy+0x ---truncated---
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
No normalized assessments.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | eab2404ba798a8efda2a970f44071c3406d94e57 to < 7cc0ba67883c6c8d3bddb283f56c167fc837a555 (affected · git)eab2404ba798a8efda2a970f44071c3406d94e57 to < fee71f480bc1dec5f6ae3b0b185ff12a62bceabc (affected · git)eab2404ba798a8efda2a970f44071c3406d94e57 to < 332e69eb3bd90370f2d9f2c2ca7974ff523dea17 (affected · git)eab2404ba798a8efda2a970f44071c3406d94e57 to < 17486960d79b900c45e0bb8fbcac0262848582ba (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 5.7 (affected)0 to < 5.7 (unaffected · semver)5.10.37 through 5.10.* (unaffected · semver)5.11.21 through 5.11.* (unaffected · semver)5.12.4 through 5.12.* (unaffected · semver)5.13 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
4Provider assertions
3Linux · cna
Bluetooth: avoid deadlock between hci_dev->lock and socket lock
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 97f024bf7d39c1f4c1eed19ff96e877244461526f863dcd4845a26376de042b4
- Ingested
- 23 Sep 2026, 07:57:04 UTC
- Source record
- Official CVE record