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 821132FE064 for ; Tue, 19 Aug 2025 17:20:52 +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=1755624052; cv=none; b=I8jUNGqTVoR6TTSOep9mC+CSE7U0bNmVL4z7fsdsg5pMeoz50gQR/gKICYDOcK1DLUrHTx39M68IBRtKhr/1XI/KSkflh6jiHjdRUNNtMWkL2WSYt+E1YqyMeRzJI8qEsdy+8yJKl2/wuZIpIQVSeCBWFz6llTiniAgRwFUCSDQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755624052; c=relaxed/simple; bh=Mlj6XOHEor5QYdxhfgchpgsLavxBN2foZMnnkWVXUU4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TEwDxl607PJQoTDOJ+3qRtY2HE5ih2ZcekbT4aw/fFJwjGOamiIz4PImw9PBK9+nnbDKkr/z81NXmRuzFbgrEdrPhr7U9v7ZWbdaPvvZnQQXBX7cNZ7yOMInhg6aTGlINaK1Ne4FcEcVOJEUm+TVwUCHhg5TXvnFA55FdMpj91Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=OBQanXq/; 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="OBQanXq/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0341C4CEF1; Tue, 19 Aug 2025 17:20:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755624052; bh=Mlj6XOHEor5QYdxhfgchpgsLavxBN2foZMnnkWVXUU4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=OBQanXq/IPvWCAbJycX/3kqs7FyJnoz8/ILZBRVAfJ218G96jfPl81YXCfUTwp83y tWPAU6sVvHtYj6gmedbhjwlMgLgrYr/6H1zPI+d9BwpK3poG0mdRhbFfrTnoZ80abE 7ssVlveeXAFOE/dUflj9WiRNtLEyHvh0goRUkzbg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38592: Bluetooth: hci_devcd_dump: fix out-of-bounds via dev_coredumpv Date: Tue, 19 Aug 2025 19:18:38 +0200 Message-ID: <2025081917-CVE-2025-38592-9905@gregkh> X-Mailer: git-send-email 2.50.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=5081; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=JhwqlKy1Wuu6tAgbNbvxFog0sN+ACd+OPK0pb0M5ZM8=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlLNt58tkinzuHmhOhkm9m7XvNU8+6cxH+GlW/BpHtln eeaiivfdMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBESpQZ5nv8T/i0e4+UmNrz OZsmTnsncIPV5RfD/DzN2XIr1jh++PrpLWPQt/LWm+JLFgIA X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: Bluetooth: hci_devcd_dump: fix out-of-bounds via dev_coredumpv Currently both dev_coredumpv and skb_put_data in hci_devcd_dump use hdev->dump.head. However, dev_coredumpv can free the buffer. From dev_coredumpm_timeout documentation, which is used by dev_coredumpv: > Creates a new device coredump for the given device. If a previous one hasn't > been read yet, the new coredump is discarded. The data lifetime is determined > by the device coredump framework and when it is no longer needed the @free > function will be called to free the data. If the data has not been read by the userspace yet, dev_coredumpv will discard new buffer, freeing hdev->dump.head. This leads to vmalloc-out-of-bounds error when skb_put_data tries to access hdev->dump.head. A crash report from syzbot illustrates this: ================================================================== BUG: KASAN: vmalloc-out-of-bounds in skb_put_data include/linux/skbuff.h:2752 [inline] BUG: KASAN: vmalloc-out-of-bounds in hci_devcd_dump+0x142/0x240 net/bluetooth/coredump.c:258 Read of size 140 at addr ffffc90004ed5000 by task kworker/u9:2/5844 CPU: 1 UID: 0 PID: 5844 Comm: kworker/u9:2 Not tainted 6.14.0-syzkaller-10892-g4e82c87058f4 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Workqueue: hci0 hci_devcd_timeout Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xc3/0x670 mm/kasan/report.c:521 kasan_report+0xe0/0x110 mm/kasan/report.c:634 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0xef/0x1a0 mm/kasan/generic.c:189 __asan_memcpy+0x23/0x60 mm/kasan/shadow.c:105 skb_put_data include/linux/skbuff.h:2752 [inline] hci_devcd_dump+0x142/0x240 net/bluetooth/coredump.c:258 hci_devcd_timeout+0xb5/0x2e0 net/bluetooth/coredump.c:413 process_one_work+0x9cc/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address ffffc90004ed5000 belongs to a vmalloc virtual mapping Memory state around the buggy address: ffffc90004ed4f00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ffffc90004ed4f80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 >ffffc90004ed5000: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ^ ffffc90004ed5080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ffffc90004ed5100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ================================================================== To avoid this issue, reorder dev_coredumpv to be called after skb_put_data that does not free the data. The Linux kernel CVE team has assigned CVE-2025-38592 to this issue. Affected and fixed versions =========================== Issue introduced in 6.15 with commit b257e02ecc46f8561d8bd88943164a10c9e90a80 and fixed in 6.15.10 with commit efd55f6a59449f8d4e4953f12c177aa902b7451f Issue introduced in 6.15 with commit b257e02ecc46f8561d8bd88943164a10c9e90a80 and fixed in 6.16.1 with commit 8c021ad797f9171d015cf0a932a3fbe5232190f5 Issue introduced in 6.15 with commit b257e02ecc46f8561d8bd88943164a10c9e90a80 and fixed in 6.17-rc1 with commit 7af4d7b53502286c6cf946d397ab183e76d14820 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-2025-38592 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/coredump.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/efd55f6a59449f8d4e4953f12c177aa902b7451f https://git.kernel.org/stable/c/8c021ad797f9171d015cf0a932a3fbe5232190f5 https://git.kernel.org/stable/c/7af4d7b53502286c6cf946d397ab183e76d14820