Skip to contentSkip to conversation

CVE-2026-31393: Bluetooth: L2CAP: Validate L2CAP_INFO_RSP payload length before access

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Apr 3

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

Bluetooth: L2CAP: Validate L2CAP_INFO_RSP payload length before access

l2cap_information_rsp() checks that cmd_len covers the fixed l2cap_info_rsp header (type + result, 4 bytes) but then reads rsp->data without verifying that the payload is present:

- L2CAP_IT_FEAT_MASK calls get_unaligned_le32(rsp->data), which reads 4 bytes past the header (needs cmd_len >= 8).

- L2CAP_IT_FIXED_CHAN reads rsp->data[0], 1 byte past the header (needs cmd_len >= 5).

A truncated L2CAP_INFO_RSP with result == L2CAP_IR_SUCCESS triggers an out-of-bounds read of adjacent skb data.

Guard each data access with the required payload length check. If the payload is too short, skip the read and let the state machine complete with safe defaults (feat_mask and remote_fixed_chan remain zero from kzalloc), so the info timer cleanup and l2cap_conn_start() still run and the connection is not stalled.

The Linux kernel CVE team has assigned CVE-2026-31393 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 2.6.24 with commit 4e8402a3f884427f9233ba436459c158d1f2e114 and fixed in 6.1.167 with commit 3b646516cba2ebc4b51a72954903326e7c1e443f
	Issue introduced in 2.6.24 with commit 4e8402a3f884427f9233ba436459c158d1f2e114 and fixed in 6.6.130 with commit 807bd1258453c4c83f6ae9dbc1e7b44860ff40d0
	Issue introduced in 2.6.24 with commit 4e8402a3f884427f9233ba436459c158d1f2e114 and fixed in 6.12.78 with commit 9aeacde4da0f02d42fd968fd32f245828b230171
	Issue introduced in 2.6.24 with commit 4e8402a3f884427f9233ba436459c158d1f2e114 and fixed in 6.18.20 with commit e7ff754e339e3d5ce29aa9f95352d0186df8fbd9
	Issue introduced in 2.6.24 with commit 4e8402a3f884427f9233ba436459c158d1f2e114 and fixed in 6.19.10 with commit db2872d054e467810078e2b9f440a5b326a601b2
	Issue introduced in 2.6.24 with commit 4e8402a3f884427f9233ba436459c158d1f2e114 and fixed in 7.0-rc5 with commit dd815e6e3918dc75a49aaabac36e4f024d675101

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-31393

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/l2cap_core.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/3b646516cba2ebc4b51a72954903326e7c1e443f
	https://git.kernel.org/stable/c/807bd1258453c4c83f6ae9dbc1e7b44860ff40d0
	https://git.kernel.org/stable/c/9aeacde4da0f02d42fd968fd32f245828b230171
	https://git.kernel.org/stable/c/e7ff754e339e3d5ce29aa9f95352d0186df8fbd9
	https://git.kernel.org/stable/c/db2872d054e467810078e2b9f440a5b326a601b2
	https://git.kernel.org/stable/c/dd815e6e3918dc75a49aaabac36e4f024d675101