CVE-2026-98247: Bluetooth: hci_codec: validate vendor codec count length
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: hci_codec: validate vendor codec count length
The Read Local Supported Codecs parsers consume the variable-sized standard codec array before parsing the vendor codec count. Although the initial reply-size check includes a vendor count byte in the fixed layout, it does not guarantee that the byte remains after the standard codec array.
If a controller reply ends immediately after that array, calculating the vendor codec array size reads vnd_codecs->num beyond the skb data. Use skb_pull_data() to validate and consume each codec header before using its count in both command variants.
The Linux kernel CVE team has assigned CVE-2026-98247 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.16 with commit 8961987f3f5fa2f2618e72304d013c8dd5e604a6 and fixed in 6.1.189 with commit 9c04b9a4d08b95dee901d24b7607c4cbd65fa0a8 Issue introduced in 5.16 with commit 8961987f3f5fa2f2618e72304d013c8dd5e604a6 and fixed in 6.6.158 with commit a6da782fefae611e68a1aa79644065fc8ca5abcd Issue introduced in 5.16 with commit 8961987f3f5fa2f2618e72304d013c8dd5e604a6 and fixed in 6.12.112 with commit e4cfd3c4299105237458b27958bd7b0aa4c60795 Issue introduced in 5.16 with commit 8961987f3f5fa2f2618e72304d013c8dd5e604a6 and fixed in 6.18.54 with commit f49a543d76d48f184b34225d9c0e2fc4cbdea8ec Issue introduced in 5.16 with commit 8961987f3f5fa2f2618e72304d013c8dd5e604a6 and fixed in 7.2.8 with commit 12a82819b0cada6e304790b1097f8f9006eb6123 Issue introduced in 5.16 with commit 8961987f3f5fa2f2618e72304d013c8dd5e604a6 and fixed in 7.3-rc4 with commit d0795cfd6f655f4de84868a4f4bb41a03f037b3d
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-98247
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
net/bluetooth/hci_codec.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/9c04b9a4d08b95dee901d24b7607c4cbd65fa0a8 https://git.kernel.org/stable/c/a6da782fefae611e68a1aa79644065fc8ca5abcd https://git.kernel.org/stable/c/e4cfd3c4299105237458b27958bd7b0aa4c60795 https://git.kernel.org/stable/c/f49a543d76d48f184b34225d9c0e2fc4cbdea8ec https://git.kernel.org/stable/c/12a82819b0cada6e304790b1097f8f9006eb6123 https://git.kernel.org/stable/c/d0795cfd6f655f4de84868a4f4bb41a03f037b3d