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 62D9C2EE980 for ; Fri, 25 Jul 2025 15:29:39 +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=1753457379; cv=none; b=FOvCHvPb3V7R3ADqmhTMNt0CUJvF0L8R31WPUqILG8TANMOIeGH8RbQtkqkQM/hDm0O6VL5sp/zK9ByV+tsN8mqRXkRjX7N7yzRZK28M3kgKFY0V+AGTT0Sy7bSr9KsLBxLmr0eTC/w+cRTLqgmRFedmw/+Bqz/UUPr8tMbhInQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753457379; c=relaxed/simple; bh=Stnd0VElh/QDPBVu7LQdy7Ki6bwNBMhCCRu4uDdxJFU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=T+COzEj2TRUXwqox6u23qfjpLDZ6mdCru4pC4sXIwVZN8zpF4ysZAZ7HwD12sSzwe27BMb07dc88tqbiXbRynQh2xJPZ31b9a4/VavlQ5SPaWBjbENf1cxZPKZVsSN3mN65AFoBBFNlOlfqwVQdZ7ogYyU3pIMjWuo9NUBN+VGU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ewYhbnir; 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="ewYhbnir" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C64F3C4CEF6; Fri, 25 Jul 2025 15:29:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1753457379; bh=Stnd0VElh/QDPBVu7LQdy7Ki6bwNBMhCCRu4uDdxJFU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ewYhbnir9GAjpCL+bNTs1y8d4A2OySinb8ucIDaOTcB8Ju+FLRXDL9vOVCK3Id4rT LF72FxiovkRZm4CvyVl7J4Yo1iYnRmZ3XYg2YsikEI/hH05oMX5suMSaix4RUc66N7 6ap+A5FQ8ysbi0zY3ENwopD3ojr1OXP0Nmbvhxrc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38442: block: reject bs > ps block devices when THP is disabled Date: Fri, 25 Jul 2025 17:28:04 +0200 Message-ID: <2025072502-CVE-2025-38442-2844@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=3233; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=2aOkGPaiYaDCitYciqSZzBJUXjsQAqLF2DHfxeSKHKQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnNi5p2TV2rO4lN7GnszJWXbHJXMf39UMTpsH+P4aH6v yq6CdH+HbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRibsZ5vsXK+vecY/bmbJl rfNXbuf0/5P332VY0Hnh7kbmeMfIWp2A1NyrFk8kqviuAgA= 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: block: reject bs > ps block devices when THP is disabled If THP is disabled and when a block device with logical block size > page size is present, the following null ptr deref panic happens during boot: [ [13.2 mK AOSAN: null-ptr-deref in range [0x0000000000000000-0x0000000000K0 0 0[07] [ 13.017749] RIP: 0010:create_empty_buffers+0x3b/0x380 [ 13.025448] Call Trace: [ 13.025692] [ 13.025895] block_read_full_folio+0x610/0x780 [ 13.026379] ? __pfx_blkdev_get_block+0x10/0x10 [ 13.027008] ? __folio_batch_add_and_move+0x1fa/0x2b0 [ 13.027548] ? __pfx_blkdev_read_folio+0x10/0x10 [ 13.028080] filemap_read_folio+0x9b/0x200 [ 13.028526] ? __pfx_filemap_read_folio+0x10/0x10 [ 13.029030] ? __filemap_get_folio+0x43/0x620 [ 13.029497] do_read_cache_folio+0x155/0x3b0 [ 13.029962] ? __pfx_blkdev_read_folio+0x10/0x10 [ 13.030381] read_part_sector+0xb7/0x2a0 [ 13.030805] read_lba+0x174/0x2c0 [ 13.045348] nvme_scan_ns+0x684/0x850 [nvme_core] [ 13.045858] ? __pfx_nvme_scan_ns+0x10/0x10 [nvme_core] [ 13.046414] ? _raw_spin_unlock+0x15/0x40 [ 13.046843] ? __switch_to+0x523/0x10a0 [ 13.047253] ? kvm_clock_get_cycles+0x14/0x30 [ 13.047742] ? __pfx_nvme_scan_ns_async+0x10/0x10 [nvme_core] [ 13.048353] async_run_entry_fn+0x96/0x4f0 [ 13.048787] process_one_work+0x667/0x10a0 [ 13.049219] worker_thread+0x63c/0xf60 As large folio support depends on THP, only allow bs > ps block devices if THP is enabled. The Linux kernel CVE team has assigned CVE-2025-38442 to this issue. Affected and fixed versions =========================== Issue introduced in 6.15 with commit 47dd67532303803a87f43195e088b3b4bcf0454d and fixed in 6.15.7 with commit b025d81b96bfe8a62b6e3e6ac776608206ccbf6d Issue introduced in 6.15 with commit 47dd67532303803a87f43195e088b3b4bcf0454d and fixed in 6.16-rc6 with commit 4cdf1bdd45ac78a088773722f009883af30ad318 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-38442 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: include/linux/blkdev.h 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/b025d81b96bfe8a62b6e3e6ac776608206ccbf6d https://git.kernel.org/stable/c/4cdf1bdd45ac78a088773722f009883af30ad318