Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 36B5712C499 for ; Mon, 21 Oct 2024 20:10:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729541406; cv=none; b=jWOVL5mgDrm6RbtE0D0bCsp89oGSrG15iIoUxKncxLHesmMNxO89jaAWV+6yRatGgnZWUQx2rVzFIcNBGTpF7/u4G+Ubso/9ihGz+mcU0JZjzfsoHH+nI4O2WOT5JnCtED15gGQmvgjfmtKHTjPOlARUovwGPTdgWsTHsMnWUOo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729541406; c=relaxed/simple; bh=ou0Kc5aX/SMRXSvGeQ93cnH0gkboED/cLN/jjD5V+dQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DAZAtgbJQ7DLo68lbQTD8u/cExZ6+u0aAtDIhRSs27/D75qieaB6PJgkdjsvHFUEOBMY14vwvidDMoa7lYtLbInvyY/AxmZkG3IuA91oOoZDP3DHzK7qRiVOD1iRos9IA/wmfzLtgk+9OkkmEO2vxj4F64YMdEuPhifdrc4dazo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=rjLPBm7W; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="rjLPBm7W" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 696AFC4CEC3; Mon, 21 Oct 2024 20:10:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729541405; bh=ou0Kc5aX/SMRXSvGeQ93cnH0gkboED/cLN/jjD5V+dQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=rjLPBm7WG4Gbfaw3aIxr7DqQ2nb/njW9qQoa+6GoYlDhu8l2/D2KrMSCGAhyAcDDx MKjN9m6GswyTmAznJDkfkSyMNUxdTYRYr5wdS9lmYIs9P53pTdFsZwQMh1bM1rUHnx 8mLvfR5BZJTLrpSS+0IyGXcST9BsGmzEg7iIIHCc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-48947: Bluetooth: L2CAP: Fix u8 overflow Date: Mon, 21 Oct 2024 22:05:39 +0200 Message-ID: <2024102140-CVE-2022-48947-0ab5@gregkh> X-Mailer: git-send-email 2.47.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=4065; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ou0Kc5aX/SMRXSvGeQ93cnH0gkboED/cLN/jjD5V+dQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDOliW0RK77D8OrpaWM2v8Yh9VKzXHN/eBXm3Xz20Vbkf7 mftHbK6I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACYy/SnDXPGScmfX7XkBHQUz /UTe1GmxedXlMszh2X1C7bXHJ8VO2S3MYbOz9Zl/b9sCAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: Bluetooth: L2CAP: Fix u8 overflow By keep sending L2CAP_CONF_REQ packets, chan->num_conf_rsp increases multiple times and eventually it will wrap around the maximum number (i.e., 255). This patch prevents this by adding a boundary check with L2CAP_MAX_CONF_RSP Btmon log: Bluetooth monitor ver 5.64 = Note: Linux version 6.1.0-rc2 (x86_64) 0.264594 = Note: Bluetooth subsystem version 2.22 0.264636 @ MGMT Open: btmon (privileged) version 1.22 {0x0001} 0.272191 = New Index: 00:00:00:00:00:00 (Primary,Virtual,hci0) [hci0] 13.877604 @ RAW Open: 9496 (privileged) version 2.22 {0x0002} 13.890741 = Open Index: 00:00:00:00:00:00 [hci0] 13.900426 (...) > ACL Data RX: Handle 200 flags 0x00 dlen 1033 #32 [hci0] 14.273106 invalid packet size (12 != 1033) 08 00 01 00 02 01 04 00 01 10 ff ff ............ > ACL Data RX: Handle 200 flags 0x00 dlen 1547 #33 [hci0] 14.273561 invalid packet size (14 != 1547) 0a 00 01 00 04 01 06 00 40 00 00 00 00 00 ........@..... > ACL Data RX: Handle 200 flags 0x00 dlen 2061 #34 [hci0] 14.274390 invalid packet size (16 != 2061) 0c 00 01 00 04 01 08 00 40 00 00 00 00 00 00 04 ........@....... > ACL Data RX: Handle 200 flags 0x00 dlen 2061 #35 [hci0] 14.274932 invalid packet size (16 != 2061) 0c 00 01 00 04 01 08 00 40 00 00 00 07 00 03 00 ........@....... = bluetoothd: Bluetooth daemon 5.43 14.401828 > ACL Data RX: Handle 200 flags 0x00 dlen 1033 #36 [hci0] 14.275753 invalid packet size (12 != 1033) 08 00 01 00 04 01 04 00 40 00 00 00 ........@... The Linux kernel CVE team has assigned CVE-2022-48947 to this issue. Affected and fixed versions =========================== Fixed in 4.9.337 with commit 49d5867819ab Fixed in 4.14.303 with commit 95f1847a361c Fixed in 4.19.270 with commit ad528fde0702 Fixed in 5.4.229 with commit 9fdc79b57143 Fixed in 5.10.161 with commit f3fe6817156a Fixed in 5.15.85 with commit 19a78143961a Fixed in 6.0.15 with commit 5550bbf709c3 Fixed in 6.1 with commit bcd70260ef56 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-2022-48947 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/49d5867819ab7c744852b45509e8469839c07e0e https://git.kernel.org/stable/c/95f1847a361c7b4bf7d74c06ecb6968455082c1a https://git.kernel.org/stable/c/ad528fde0702903208d0a79d88d5a42ae3fc235b https://git.kernel.org/stable/c/9fdc79b571434af7bc742da40a3405f038b637a7 https://git.kernel.org/stable/c/f3fe6817156a2ad4b06f01afab04638a34d7c9a6 https://git.kernel.org/stable/c/19a78143961a197de8502f4f29c453b913dc3c29 https://git.kernel.org/stable/c/5550bbf709c323194881737fd290c4bada9e6ead https://git.kernel.org/stable/c/bcd70260ef56e0aee8a4fc6cd214a419900b0765