CVE-2024-26890
Severity CVSS v4.0:
Pending analysis
Type:
CWE-125
Out-of-bounds Read
Publication date:
17/04/2024
Last modified:
21/03/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
Bluetooth: btrtl: fix out of bounds memory access<br />
<br />
The problem is detected by KASAN.<br />
btrtl driver uses private hci data to store &#39;struct btrealtek_data&#39;.<br />
If btrtl driver is used with btusb, then memory for private hci data<br />
is allocated in btusb. But no private data is allocated after hci_dev,<br />
when btrtl is used with hci_h5.<br />
<br />
This commit adds memory allocation for hci_h5 case.<br />
<br />
==================================================================<br />
BUG: KASAN: slab-out-of-bounds in btrtl_initialize+0x6cc/0x958 [btrtl]<br />
Write of size 8 at addr ffff00000f5a5748 by task kworker/u9:0/76<br />
<br />
Hardware name: Pine64 PinePhone (1.2) (DT)<br />
Workqueue: hci0 hci_power_on [bluetooth]<br />
Call trace:<br />
dump_backtrace+0x9c/0x128<br />
show_stack+0x20/0x38<br />
dump_stack_lvl+0x48/0x60<br />
print_report+0xf8/0x5d8<br />
kasan_report+0x90/0xd0<br />
__asan_store8+0x9c/0xc0<br />
[btrtl]<br />
h5_btrtl_setup+0xd0/0x2f8 [hci_uart]<br />
h5_setup+0x50/0x80 [hci_uart]<br />
hci_uart_setup+0xd4/0x260 [hci_uart]<br />
hci_dev_open_sync+0x1cc/0xf68 [bluetooth]<br />
hci_dev_do_open+0x34/0x90 [bluetooth]<br />
hci_power_on+0xc4/0x3c8 [bluetooth]<br />
process_one_work+0x328/0x6f0<br />
worker_thread+0x410/0x778<br />
kthread+0x168/0x178<br />
ret_from_fork+0x10/0x20<br />
<br />
Allocated by task 53:<br />
kasan_save_stack+0x3c/0x68<br />
kasan_save_track+0x20/0x40<br />
kasan_save_alloc_info+0x68/0x78<br />
__kasan_kmalloc+0xd4/0xd8<br />
__kmalloc+0x1b4/0x3b0<br />
hci_alloc_dev_priv+0x28/0xa58 [bluetooth]<br />
hci_uart_register_device+0x118/0x4f8 [hci_uart]<br />
h5_serdev_probe+0xf4/0x178 [hci_uart]<br />
serdev_drv_probe+0x54/0xa0<br />
really_probe+0x254/0x588<br />
__driver_probe_device+0xc4/0x210<br />
driver_probe_device+0x64/0x160<br />
__driver_attach_async_helper+0x88/0x158<br />
async_run_entry_fn+0xd0/0x388<br />
process_one_work+0x328/0x6f0<br />
worker_thread+0x410/0x778<br />
kthread+0x168/0x178<br />
ret_from_fork+0x10/0x20<br />
<br />
Last potentially related work creation:<br />
kasan_save_stack+0x3c/0x68<br />
__kasan_record_aux_stack+0xb0/0x150<br />
kasan_record_aux_stack_noalloc+0x14/0x20<br />
__queue_work+0x33c/0x960<br />
queue_work_on+0x98/0xc0<br />
hci_recv_frame+0xc8/0x1e8 [bluetooth]<br />
h5_complete_rx_pkt+0x2c8/0x800 [hci_uart]<br />
h5_rx_payload+0x98/0xb8 [hci_uart]<br />
h5_recv+0x158/0x3d8 [hci_uart]<br />
hci_uart_receive_buf+0xa0/0xe8 [hci_uart]<br />
ttyport_receive_buf+0xac/0x178<br />
flush_to_ldisc+0x130/0x2c8<br />
process_one_work+0x328/0x6f0<br />
worker_thread+0x410/0x778<br />
kthread+0x168/0x178<br />
ret_from_fork+0x10/0x20<br />
<br />
Second to last potentially related work creation:<br />
kasan_save_stack+0x3c/0x68<br />
__kasan_record_aux_stack+0xb0/0x150<br />
kasan_record_aux_stack_noalloc+0x14/0x20<br />
__queue_work+0x788/0x960<br />
queue_work_on+0x98/0xc0<br />
__hci_cmd_sync_sk+0x23c/0x7a0 [bluetooth]<br />
__hci_cmd_sync+0x24/0x38 [bluetooth]<br />
btrtl_initialize+0x760/0x958 [btrtl]<br />
h5_btrtl_setup+0xd0/0x2f8 [hci_uart]<br />
h5_setup+0x50/0x80 [hci_uart]<br />
hci_uart_setup+0xd4/0x260 [hci_uart]<br />
hci_dev_open_sync+0x1cc/0xf68 [bluetooth]<br />
hci_dev_do_open+0x34/0x90 [bluetooth]<br />
hci_power_on+0xc4/0x3c8 [bluetooth]<br />
process_one_work+0x328/0x6f0<br />
worker_thread+0x410/0x778<br />
kthread+0x168/0x178<br />
ret_from_fork+0x10/0x20<br />
==================================================================
Impact
Base Score 3.x
6.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.23 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.7.11 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.8 (including) | 6.8.2 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/0c657e641df1e77d6087688190f632cad9c0439b
- https://git.kernel.org/stable/c/2f232bc389a4f5943c40733582f9edf77b89e499
- https://git.kernel.org/stable/c/dd163fa34c483f1674aa2510accce11a224f649e
- https://git.kernel.org/stable/c/de4e88ec58c4202efd1f02eebb4939bbf6945358
- https://git.kernel.org/stable/c/0c657e641df1e77d6087688190f632cad9c0439b
- https://git.kernel.org/stable/c/2f232bc389a4f5943c40733582f9edf77b89e499
- https://git.kernel.org/stable/c/dd163fa34c483f1674aa2510accce11a224f649e
- https://git.kernel.org/stable/c/de4e88ec58c4202efd1f02eebb4939bbf6945358



