PT-2026-163417
CVE-2026-139376
·
Published
2026-11-30
·
Updated
2026-11-30
Description by
Score
N/A
Not availableNo severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: msft: Lock failed probe cleanup against feature readers
The MSFT data must remain allocated while msft get features() reads
its features. read adv mon features() protects that access with
hdev->lock, but msft do open() clears hdev->msft data and frees the
object without that lock when read supported features() fails.
After a successful probe, the data survives a normal close. A later
open can fail the probe while a management feature request is running.
hci mgmt cmd() permits requests during HCI INIT, and the opener's
hdev->req lock does not serialize the management reader:
Management feature request HCI open
hold hdev->req lock
msft do open()
hold hdev->lock
msft get features(): save msft
read supported features() fails
hdev->msft data = NULL
kfree(msft)
read msft->features
release hdev->lock release hdev->req lock
The saved pointer then refers to freed memory, causing a use-after-free
read. Advertisement reporting through mgmt device found() also reads
the features with hdev->lock held.
Take hdev->lock around clearing and freeing msft data in the failure
branch. An existing feature reader finishes before the free, while a
reader starting after cleanup sees NULL. Keep the synchronous probe
outside this critical section, following the existing req lock to
hdev->lock ordering.
KASAN report as below:
==================================================================
BUG: KASAN: slab-use-after-free in msft monitor supported+0xa9/0xb0
Read of size 8 at addr ffff88811573ee00 by task mgmt-read-adv-m/532
CPU: 2 UID: 0 PID: 532 Comm: mgmt-read-adv-m Not tainted7.2.0-rc6-pmb-bt-functional-v1+ #1 PREEMPT(lazy)
Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch caps
fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
dump stack lvl+0x93/0xd0
print report+0xce/0x630
? msft monitor supported+0xa9/0xb0
? srso alias return thunk+0x5/0xfbef5
? virt addr valid+0x20d/0x410
? msft monitor supported+0xa9/0xb0
kasan report+0xe0/0x110
? msft monitor supported+0xa9/0xb0
msft monitor supported+0xa9/0xb0
read adv mon features+0xdf/0x640
? trace hardirqs on+0x18/0x160
? srso alias return thunk+0x5/0xfbef5
? pfx read adv mon features+0x10/0x10
? srso alias return thunk+0x5/0xfbef5
? srso alias return thunk+0x5/0xfbef5
? do raw read unlock+0x49/0xe0
? srso alias return thunk+0x5/0xfbef5
? raw read unlock+0x23/0x40
hci sock sendmsg+0x12b5/0x2270
? pfx hci sock sendmsg+0x10/0x10
? srso alias return thunk+0x5/0xfbef5
? selinux socket sendmsg+0x160/0x280
sys sendto+0x425/0x470
? pfx hci sock sendmsg+0x10/0x10
? pfx sys sendto+0x10/0x10
? srso alias return thunk+0x5/0xfbef5
? srso alias return thunk+0x5/0xfbef5
? srso alias return thunk+0x5/0xfbef5
? sys setsockopt+0x119/0x180
x64 sys sendto+0xe5/0x1c0
? lockdep hardirqs on prepare+0xea/0x1a0
? srso alias return thunk+0x5/0xfbef5
? trace hardirqs on+0x18/0x160
do syscall 64+0x115/0x6a0
entry SYSCALL 64 after hwframe+0x77/0x7f
RIP: 0033:0x7f9ceb04a687
Code: 48 89 fa 4c 89 df e8 58 b3 00 00 8b 93 08 03 00 00 59 5e 48
83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b>
c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff
RSP: 002b:00007ffe6ab96a70 EFLAGS: 00000202 ORIG RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 00007f9ceafb8780 RCX: 00007f9ceb04a687
RDX: 0000000000000006 RSI: 00007ffe6ab96aea RDI: 0000000000000003
RBP: 0000000000000002 R08:
---truncated---
Found an issue in the description? Have something to add? Feel free to write us 👾