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 5F51B3CD8B2 for ; Wed, 18 Mar 2026 11:38:56 +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=1773833936; cv=none; b=R9eeIoeKHgBTdQ87K8M6pvoBNFKPrzoypgB8y79rUpEmIdabJwGEKt8qPoj+vCAw0HbpLOQZ0wm8jj9l6hsx6DPoBNPsk0/VMNjZkWCHrpW/zwt6ny+pCxtCyKZDDyGf+UoCu6BV0qI09rPRdaTWJM/7+pyExrFGSrJshxksRW8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773833936; c=relaxed/simple; bh=5W8/13voB0dxBDDaT74mPm+ESanTe9wBt06/jdBj7sE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=s0omSZNSddfd4+QXgoPLbJ9qPbcFwy8jt+I43L3u6WOe9g3waADV24NZ+k/I8ip2pL7yotuRNUbdGiMZNNpp21aQJDmNkrKwilBu+PfaQEQeGHVYq3aQZnjizTWkqPC5M9vh2EEJvD6CMSvJsCJxBAUTrPkNwO7QU7OEOo5L/pA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wNJvlH+I; 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="wNJvlH+I" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29534C19421; Wed, 18 Mar 2026 11:38:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1773833935; bh=5W8/13voB0dxBDDaT74mPm+ESanTe9wBt06/jdBj7sE=; h=From:To:Cc:Subject:Date:Reply-To:From; b=wNJvlH+I6ZdH3nLIJA81ID1x+2Hi6Y/CdwVSPwW9BrmKkOWRgPLJKwI4UKFEIYlB2 UILrJIeEv0vaSZQmcWYbNIDrOj6dcyhUEkTkDttW8ftwOuzCKmBOpbH+CduOxgL/m3 FDWrA3kCg+qULPn+PHq5bFjdGA/lYfDKuwD/KGEQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-23244: nvme: fix memory allocation in nvme_pr_read_keys() Date: Wed, 18 Mar 2026 11:05:19 +0100 Message-ID: <2026031817-CVE-2026-23244-9738@gregkh> X-Mailer: git-send-email 2.53.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5711; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=4Vk1RABsUSnYEmFJJCZ8R353Wc9WXkX0vLmAC9qWPuo=; b=owGbwMvMwCRo6H6F97bub03G02pJDJm7Ku7OX/VK6tBa7we2Enmeugs939V65V3wSu3Z6hN19 +qaqteMHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCR2GCGBSedhZvf+fgcYDvA ZLhAxDnkVUurPsN8r1zHJ1b1YTpXn+o9K/gj3rrb9YY2AA== 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: nvme: fix memory allocation in nvme_pr_read_keys() nvme_pr_read_keys() takes num_keys from userspace and uses it to calculate the allocation size for rse via struct_size(). The upper limit is PR_KEYS_MAX (64K). A malicious or buggy userspace can pass a large num_keys value that results in a 4MB allocation attempt at most, causing a warning in the page allocator when the order exceeds MAX_PAGE_ORDER. To fix this, use kvzalloc() instead of kzalloc(). This bug has the same reasoning and fix with the patch below: https://lore.kernel.org/linux-block/20251212013510.3576091-1-kartikey406@gmail.com/ Warning log: WARNING: mm/page_alloc.c:5216 at __alloc_frozen_pages_noprof+0x5aa/0x2300 mm/page_alloc.c:5216, CPU#1: syz-executor117/272 Modules linked in: CPU: 1 UID: 0 PID: 272 Comm: syz-executor117 Not tainted 6.19.0 #1 PREEMPT(voluntary) Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 RIP: 0010:__alloc_frozen_pages_noprof+0x5aa/0x2300 mm/page_alloc.c:5216 Code: ff 83 bd a8 fe ff ff 0a 0f 86 69 fb ff ff 0f b6 1d f9 f9 c4 04 80 fb 01 0f 87 3b 76 30 ff 83 e3 01 75 09 c6 05 e4 f9 c4 04 01 <0f> 0b 48 c7 85 70 fe ff ff 00 00 00 00 e9 8f fd ff ff 31 c0 e9 0d RSP: 0018:ffffc90000fcf450 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 1ffff920001f9ea0 RDX: 0000000000000000 RSI: 000000000000000b RDI: 0000000000040dc0 RBP: ffffc90000fcf648 R08: ffff88800b6c3380 R09: 0000000000000001 R10: ffffc90000fcf840 R11: ffff88807ffad280 R12: 0000000000000000 R13: 0000000000040dc0 R14: 0000000000000001 R15: ffffc90000fcf620 FS: 0000555565db33c0(0000) GS:ffff8880be26c000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000002000000c CR3: 0000000003b72000 CR4: 00000000000006f0 Call Trace: alloc_pages_mpol+0x236/0x4d0 mm/mempolicy.c:2486 alloc_frozen_pages_noprof+0x149/0x180 mm/mempolicy.c:2557 ___kmalloc_large_node+0x10c/0x140 mm/slub.c:5598 __kmalloc_large_node_noprof+0x25/0xc0 mm/slub.c:5629 __do_kmalloc_node mm/slub.c:5645 [inline] __kmalloc_noprof+0x483/0x6f0 mm/slub.c:5669 kmalloc_noprof include/linux/slab.h:961 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] nvme_pr_read_keys+0x8f/0x4c0 drivers/nvme/host/pr.c:245 blkdev_pr_read_keys block/ioctl.c:456 [inline] blkdev_common_ioctl+0x1b71/0x29b0 block/ioctl.c:730 blkdev_ioctl+0x299/0x700 block/ioctl.c:786 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl fs/ioctl.c:583 [inline] __x64_sys_ioctl+0x1bf/0x220 fs/ioctl.c:583 x64_sys_call+0x1280/0x21b0 mnt/fuzznvme_1/fuzznvme/linux-build/v6.19/./arch/x86/include/generated/asm/syscalls_64.h:17 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x71/0x330 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7fb893d3108d Code: 28 c3 e8 46 1e 00 00 66 0f 1f 44 00 00 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffff61f2f38 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007ffff61f3138 RCX: 00007fb893d3108d RDX: 0000000020000040 RSI: 00000000c01070ce RDI: 0000000000000003 RBP: 0000000000000001 R08: 0000000000000000 R09: 00007ffff61f3138 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffff61f3128 R14: 00007fb893dae530 R15: 0000000000000001 The Linux kernel CVE team has assigned CVE-2026-23244 to this issue. Affected and fixed versions =========================== Issue introduced in 6.5 with commit 5fd96a4e15de8442915a912233d800c56f49001d and fixed in 6.12.77 with commit 15fb6d627484ee39ed73e202ef4720e1fa5c898e Issue introduced in 6.5 with commit 5fd96a4e15de8442915a912233d800c56f49001d and fixed in 6.18.17 with commit 5a501379a010690ae9ae88bef62a1bae1aca32e6 Issue introduced in 6.5 with commit 5fd96a4e15de8442915a912233d800c56f49001d and fixed in 6.19.7 with commit baef52d80093bd686e70b3cb7e0512a40ae76705 Issue introduced in 6.5 with commit 5fd96a4e15de8442915a912233d800c56f49001d and fixed in 7.0-rc3 with commit c3320153769f05fd7fe9d840cb555dd3080ae424 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-23244 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/nvme/host/pr.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/15fb6d627484ee39ed73e202ef4720e1fa5c898e https://git.kernel.org/stable/c/5a501379a010690ae9ae88bef62a1bae1aca32e6 https://git.kernel.org/stable/c/baef52d80093bd686e70b3cb7e0512a40ae76705 https://git.kernel.org/stable/c/c3320153769f05fd7fe9d840cb555dd3080ae424