CVE-2026-142906: Bluetooth: MGMT: Reject quality report requests during unregister
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: MGMT: Reject quality report requests during unregister
A quality report request must not call a driver callback after its module text has been released. hcimgmtcmd() holds an hcidev reference through setexpfeature(), but that reference only preserves the device allocation. setqualityreportfunc() takes reqlock and invokes hdev->setqualityreport without checking HCIUNREGISTER.
This is unsafe when a SETEXPFEATURE request for an Intel controller would change HCIQUALITYREPORT and is delayed before taking reqlock while the controller is removed. With btintelpcie and btintel built as modules and no other btintel dependents, the following order is possible:
Management request Removal and module unload ------------------ ------------------------- hcimgmtcmd(): retain hdev hciunregisterdev(): set HCIUNREGISTER remove hdev from lookup close under reqlock release reqlock btintelpcieremove(): return unload btintelpcie, then btintel setqualityreportfunc(): take reqlock call hdev->setqualityreport
When the request resumes after btintel unload, the indirect call targets released module text and can cause an instruction-fetch page fault. The close operation serializes with a running callback but does not prevent a delayed management handler from invoking it afterwards.
Check HCIUNREGISTER immediately after acquiring the existing reqlock and return MGMTSTATUSINVALIDINDEX via the common unlock path. If unregister passed its close section first, the request now rejects the removed controller before accessing the callback. If the request passes the check first, hcidevdoclose() must wait for reqlock until the callback has returned, so unregister cannot finish before the use.
Oops report as below:
BUG: unable to handle page fault for address: ffffffffc0408e10 #PF: supervisor instruction fetch in kernel mode #PF: errorcode(0x0010) - not-present page PGD 80a9067 P4D 80a9067 PUD 80ab067 PMD 0 Oops: Oops: 0010 [#1] SMP KASAN NOPTI CPU: 1 UID: 0 PID: 439 Comm: btmgmt Tainted: G O 7.2.0-rc6-pmb-bt-functional-v1+ #1 PREEMPT(lazy) Tainted: [O]=OOTMODULE Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, archcaps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:0xffffffffc0408e10 Code: Unable to access opcode bytes at 0xffffffffc0408de6. RSP: 0018:ffff888110927838 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 1ffff11022124f0c RCX: ffffffff85b1a1b6 RDX: ffff888117511d00 RSI: 0000000000000001 RDI: ffff888117598000 RBP: ffff888110927950 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff893d3057 R11: ffff888117511d00 R12: ffff888117598000 R13: 0000000000000001 R14: ffffffffc0408e10 R15: ffff888117599970 FS: 00007f15453f2040(0000) GS:ffff8881fd852000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffc0408de6 CR3: 000000010b832005 CR4: 0000000000770ef0 PKRU: 55555554 Call Trace: <TASK> ? setqualityreportfunc+0x232/0x660 ? pfxsetqualityreportfunc+0x10/0x10 ? pmbdgatemaybe+0x47/0x60 ? srsoaliasreturnthunk+0x5/0xfbef5 ? pmbdprobehitcookie+0xe7/0x1c0 ? srsoaliasreturnthunk+0x5/0xfbef5 ? pmbdprobehitcookie+0xee/0x1c0 setexpfeature+0xf7/0x260 ? setexpfeature+0xf7/0x260 ? hcisocksendmsg+0x12b2/0x2400 ? pfxhcisocksendmsg+0x10/0x10 ? srsoaliasreturnthunk+0x5/0xfbef5 ? selinuxsocketsendmsg+0x160/0x280 ? sockwriteiter+0x4c0/0x550 ? pfxhcisock ---truncated---
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In set_quality_report_func(), acquire req_lock and then check HCI_UNREGISTER; if it is set, return MGMT_STATUS_INVALID_INDEX via the common unlock path without calling hdev->set_quality_report.
Event History
Frequently Asked Questions
Which systems are exposed to the described race?
The described scenario involves an Intel Bluetooth controller using the btintel_pcie and btintel drivers as modules. It requires a management SET_EXP_FEATURE request that changes HCI_QUALITY_REPORT while the controller is being removed and the driver modules can be unloaded.
What conditions are required for the unsafe callback to occur?
A quality-report-related management request must be delayed before it acquires req_lock, while device unregister sets HCI_UNREGISTER, removes and closes the device, and driver removal returns. The btintel_pcie and then btintel modules must then unload before the request resumes and invokes hdev->set_quality_report.
How can an administrator assess whether their configuration matches the reported scenario?
Check whether the affected Intel Bluetooth driver components are built as unloadable modules and whether there are no other btintel dependents preventing unload. The reported ordering also requires controller removal to occur concurrently with a management request that changes the HCI_QUALITY_REPORT experimental feature.