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 E9959158A09 for ; Wed, 26 Feb 2025 02:15:09 +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=1740536110; cv=none; b=pdHQTu92IpL89PvgvV3u/GyEjGF8KwsZQl+OHB84gxlb7PAQl7XDN/w/1xQMj5agQ5eui2bMHa7Zf6N5qVKtA5IN7buftXDT7kIcZ44gp0AM5MI8xFa9yC8RopwFxUE7twHR3OzmAOMNOL0kfViTK82vbxepiOUM7mPKm8LbwiI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536110; c=relaxed/simple; bh=tJCUaxlJY5jdBChJqRf1EHxbjZ1gdx4jd668RWekZkU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=L4YOuUD6WfMmvYQm4q68VhfoWAV931haDb9jVNfsyYQZvDJSHbLeHS4s4QKTolauBX2F3YKT9yG1WjpmIoCU4ThWQKiJQsEh4AK5p57A0z231w+QyURFNI8gTI5WHkvLB2me3o2uxYRaMetLBeTHjJY8WAH7RFnP1nFl/AnmZZk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=PsbMgy18; 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="PsbMgy18" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BFD30C4CEE6; Wed, 26 Feb 2025 02:15:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536109; bh=tJCUaxlJY5jdBChJqRf1EHxbjZ1gdx4jd668RWekZkU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=PsbMgy18vGyp+8F0/jWTwEyh7FzgKdI2CkccA1S/kScFMwl5v5gK2Ml9dwkG9dE3/ 4L6x7taaAQtXSTBsiPX9/oM+gCL572C1aCtXxZ19ltsa9UigvcrFdfwpEVM2Wcn1m2 A3x0w7i0jNgG7dRZotkwt2jBDRnh7SZry/3K4ocY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49470: Bluetooth: btmtksdio: fix use-after-free at btmtksdio_recv_event Date: Wed, 26 Feb 2025 03:12:24 +0100 Message-ID: <2025022602-CVE-2022-49470-1421@gregkh> X-Mailer: git-send-email 2.48.1 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=4176; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=tJCUaxlJY5jdBChJqRf1EHxbjZ1gdx4jd668RWekZkU=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7yn95Xd7fwjFzaaZEyMInLOstJ5xgu1I+5/npdtUr7 p4sO1h8O2JYGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAi68QZFqwOPrxn0WKT4l9d uw63HNI9uY7xlDbDVJk/lhOfb9i/bF2dyQXZ7Zl/nLY+AwA= 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: btmtksdio: fix use-after-free at btmtksdio_recv_event We should not access skb buffer data anymore after hci_recv_frame was called. [ 39.634809] BUG: KASAN: use-after-free in btmtksdio_recv_event+0x1b0 [ 39.634855] Read of size 1 at addr ffffff80cf28a60d by task kworker [ 39.634962] Call trace: [ 39.634974] dump_backtrace+0x0/0x3b8 [ 39.634999] show_stack+0x20/0x2c [ 39.635016] dump_stack_lvl+0x60/0x78 [ 39.635040] print_address_description+0x70/0x2f0 [ 39.635062] kasan_report+0x154/0x194 [ 39.635079] __asan_report_load1_noabort+0x44/0x50 [ 39.635099] btmtksdio_recv_event+0x1b0/0x1c4 [ 39.635129] btmtksdio_txrx_work+0x6cc/0xac4 [ 39.635157] process_one_work+0x560/0xc5c [ 39.635177] worker_thread+0x7ec/0xcc0 [ 39.635195] kthread+0x2d0/0x3d0 [ 39.635215] ret_from_fork+0x10/0x20 [ 39.635247] Allocated by task 0: [ 39.635260] (stack is not available) [ 39.635281] Freed by task 2392: [ 39.635295] kasan_save_stack+0x38/0x68 [ 39.635319] kasan_set_track+0x28/0x3c [ 39.635338] kasan_set_free_info+0x28/0x4c [ 39.635357] ____kasan_slab_free+0x104/0x150 [ 39.635374] __kasan_slab_free+0x18/0x28 [ 39.635391] slab_free_freelist_hook+0x114/0x248 [ 39.635410] kfree+0xf8/0x2b4 [ 39.635427] skb_free_head+0x58/0x98 [ 39.635447] skb_release_data+0x2f4/0x410 [ 39.635464] skb_release_all+0x50/0x60 [ 39.635481] kfree_skb+0xc8/0x25c [ 39.635498] hci_event_packet+0x894/0xca4 [bluetooth] [ 39.635721] hci_rx_work+0x1c8/0x68c [bluetooth] [ 39.635925] process_one_work+0x560/0xc5c [ 39.635951] worker_thread+0x7ec/0xcc0 [ 39.635970] kthread+0x2d0/0x3d0 [ 39.635990] ret_from_fork+0x10/0x20 [ 39.636021] The buggy address belongs to the object at ffffff80cf28a600 which belongs to the cache kmalloc-512 of size 512 [ 39.636039] The buggy address is located 13 bytes inside of 512-byte region [ffffff80cf28a600, ffffff80cf28a800) The Linux kernel CVE team has assigned CVE-2022-49470 to this issue. Affected and fixed versions =========================== Issue introduced in 5.2 with commit 9aebfd4a2200ab8075e44379c758bccefdc589bb and fixed in 5.15.54 with commit b3cec8a42fcd11d05313c724f27e01b1db77522c Issue introduced in 5.2 with commit 9aebfd4a2200ab8075e44379c758bccefdc589bb and fixed in 5.17.14 with commit 02ba31e09a26e8cd4582ac8e6163d80284997727 Issue introduced in 5.2 with commit 9aebfd4a2200ab8075e44379c758bccefdc589bb and fixed in 5.18.3 with commit 01c6a899fa6be4f4cbf60c4f44f0f6691155415f Issue introduced in 5.2 with commit 9aebfd4a2200ab8075e44379c758bccefdc589bb and fixed in 5.19 with commit 0fab6361c4ba17d1b43a991bef4238a3c1754d35 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-49470 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: drivers/bluetooth/btmtksdio.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/b3cec8a42fcd11d05313c724f27e01b1db77522c https://git.kernel.org/stable/c/02ba31e09a26e8cd4582ac8e6163d80284997727 https://git.kernel.org/stable/c/01c6a899fa6be4f4cbf60c4f44f0f6691155415f https://git.kernel.org/stable/c/0fab6361c4ba17d1b43a991bef4238a3c1754d35