CVE-2024-26890

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-26890
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-26890.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-26890
Downstream
Published
2024-04-17T10:27:43Z
Modified
2025-10-09T06:25:48.935116Z
Severity
  • 6.5 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L CVSS Calculator
Summary
Bluetooth: btrtl: fix out of bounds memory access
Details

In the Linux kernel, the following vulnerability has been resolved:

Bluetooth: btrtl: fix out of bounds memory access

The problem is detected by KASAN. btrtl driver uses private hci data to store 'struct btrealtekdata'. If btrtl driver is used with btusb, then memory for private hci data is allocated in btusb. But no private data is allocated after hcidev, when btrtl is used with hci_h5.

This commit adds memory allocation for hci_h5 case.

================================================================== BUG: KASAN: slab-out-of-bounds in btrtl_initialize+0x6cc/0x958 [btrtl] Write of size 8 at addr ffff00000f5a5748 by task kworker/u9:0/76

Hardware name: Pine64 PinePhone (1.2) (DT) Workqueue: hci0 hcipoweron [bluetooth] Call trace: dumpbacktrace+0x9c/0x128 showstack+0x20/0x38 dumpstacklvl+0x48/0x60 printreport+0xf8/0x5d8 kasanreport+0x90/0xd0 _asanstore8+0x9c/0xc0 [btrtl] h5btrtlsetup+0xd0/0x2f8 [hciuart] h5setup+0x50/0x80 [hciuart] hciuartsetup+0xd4/0x260 [hciuart] hcidevopensync+0x1cc/0xf68 [bluetooth] hcidevdoopen+0x34/0x90 [bluetooth] hcipoweron+0xc4/0x3c8 [bluetooth] processonework+0x328/0x6f0 workerthread+0x410/0x778 kthread+0x168/0x178 retfrom_fork+0x10/0x20

Allocated by task 53: kasansavestack+0x3c/0x68 kasansavetrack+0x20/0x40 kasansaveallocinfo+0x68/0x78 _kasankmalloc+0xd4/0xd8 _kmalloc+0x1b4/0x3b0 hciallocdevpriv+0x28/0xa58 [bluetooth] hciuartregisterdevice+0x118/0x4f8 [hciuart] h5serdevprobe+0xf4/0x178 [hciuart] serdevdrvprobe+0x54/0xa0 reallyprobe+0x254/0x588 _driverprobedevice+0xc4/0x210 driverprobedevice+0x64/0x160 _driverattachasynchelper+0x88/0x158 asyncrunentryfn+0xd0/0x388 processonework+0x328/0x6f0 workerthread+0x410/0x778 kthread+0x168/0x178 retfromfork+0x10/0x20

Last potentially related work creation: kasansavestack+0x3c/0x68 _kasanrecordauxstack+0xb0/0x150 kasanrecordauxstacknoalloc+0x14/0x20 _queuework+0x33c/0x960 queueworkon+0x98/0xc0 hcirecvframe+0xc8/0x1e8 [bluetooth] h5completerxpkt+0x2c8/0x800 [hciuart] h5rxpayload+0x98/0xb8 [hciuart] h5recv+0x158/0x3d8 [hciuart] hciuartreceivebuf+0xa0/0xe8 [hciuart] ttyportreceivebuf+0xac/0x178 flushtoldisc+0x130/0x2c8 processonework+0x328/0x6f0 workerthread+0x410/0x778 kthread+0x168/0x178 retfromfork+0x10/0x20

Second to last potentially related work creation: kasansavestack+0x3c/0x68 _kasanrecordauxstack+0xb0/0x150 kasanrecordauxstacknoalloc+0x14/0x20 _queuework+0x788/0x960 queueworkon+0x98/0xc0 _hcicmdsyncsk+0x23c/0x7a0 [bluetooth] _hcicmdsync+0x24/0x38 [bluetooth] btrtlinitialize+0x760/0x958 [btrtl] h5btrtlsetup+0xd0/0x2f8 [hciuart] h5setup+0x50/0x80 [hciuart] hciuartsetup+0xd4/0x260 [hciuart] hcidevopensync+0x1cc/0xf68 [bluetooth] hcidevdoopen+0x34/0x90 [bluetooth] hcipoweron+0xc4/0x3c8 [bluetooth] processonework+0x328/0x6f0 workerthread+0x410/0x778 kthread+0x168/0x178 retfrom_fork+0x10/0x20 ==================================================================

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
5b355944b19011011dd3fd4187444c5ff1d76ad2
Fixed
dd163fa34c483f1674aa2510accce11a224f649e
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
5b355944b19011011dd3fd4187444c5ff1d76ad2
Fixed
2f232bc389a4f5943c40733582f9edf77b89e499
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
5b355944b19011011dd3fd4187444c5ff1d76ad2
Fixed
0c657e641df1e77d6087688190f632cad9c0439b
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
5b355944b19011011dd3fd4187444c5ff1d76ad2
Fixed
de4e88ec58c4202efd1f02eebb4939bbf6945358

Affected versions

v6.*

v6.1
v6.2
v6.2-rc1
v6.2-rc2
v6.2-rc3
v6.2-rc4
v6.2-rc5
v6.2-rc6
v6.2-rc7
v6.2-rc8
v6.3
v6.3-rc1
v6.3-rc2
v6.3-rc3
v6.3-rc4
v6.3-rc5
v6.3-rc6
v6.3-rc7
v6.4
v6.4-rc1
v6.4-rc2
v6.4-rc3
v6.4-rc4
v6.4-rc5
v6.4-rc6
v6.4-rc7
v6.5
v6.5-rc1
v6.5-rc2
v6.5-rc3
v6.5-rc4
v6.5-rc5
v6.5-rc6
v6.5-rc7
v6.6
v6.6-rc1
v6.6-rc2
v6.6-rc3
v6.6-rc4
v6.6-rc5
v6.6-rc6
v6.6-rc7
v6.6.1
v6.6.10
v6.6.11
v6.6.12
v6.6.13
v6.6.14
v6.6.15
v6.6.16
v6.6.17
v6.6.18
v6.6.19
v6.6.2
v6.6.20
v6.6.21
v6.6.22
v6.6.3
v6.6.4
v6.6.5
v6.6.6
v6.6.7
v6.6.8
v6.6.9
v6.7
v6.7-rc1
v6.7-rc2
v6.7-rc3
v6.7-rc4
v6.7-rc5
v6.7-rc6
v6.7-rc7
v6.7-rc8
v6.7.1
v6.7.10
v6.7.2
v6.7.3
v6.7.4
v6.7.5
v6.7.6
v6.7.7
v6.7.8
v6.7.9
v6.8
v6.8-rc1
v6.8-rc2
v6.8-rc3
v6.8-rc4
v6.8-rc5
v6.8-rc6
v6.8-rc7
v6.8.1

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.23
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.7.11
Type
ECOSYSTEM
Events
Introduced
6.8.0
Fixed
6.8.2