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 CBF2A332EB5 for ; Wed, 24 Dec 2025 13:07: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=1766581629; cv=none; b=T9XF1B8uWQej3KUpxM7UsdE/mbyIIL38ItovRWbkmJMilsLNv9DFOE+GMhMuewIZ50blvZ+1C9qEu4XjeXnDhc5w2qks1uI8vAefLN2mQzM8S4ZA8mLsUBKXsTPwTVKVHGZkfq/973lzm1s+uHaCfS+607QUEIudn3mpEYJv3NU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766581629; c=relaxed/simple; bh=6aZWynw2XsqknnzGKeNEYB7rJS4+oAFO4S9ob8qAGGI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EoGrhorPDvKZXEC2GWQNJWHdu4ycCHWWQwQID9t4wn6hqPj9xN27s1AqGH3yKhllmqp3z5bdDia4pBC4Yes8WZcYL90T/vB9RpCtR5XxfY6bqDkHl1VNWhie1F+0JqCrn83M8++CXBqjQBpZXIpP7mUw5xnK/QBOz+Xfk4V8LNE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=WusH5vtP; 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="WusH5vtP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF4ADC4CEFB; Wed, 24 Dec 2025 13:07:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1766581629; bh=6aZWynw2XsqknnzGKeNEYB7rJS4+oAFO4S9ob8qAGGI=; h=From:To:Cc:Subject:Date:Reply-To:From; b=WusH5vtPiENyNJ4bnMx7jsVVmJfsJr7H5jqx4yhrMTzfTsE/IaoOaOZiBilA+pWPV 845nWJ7rXhbpbRELNnx1ZIJZHX9ehoFi/B4aJK2/0e/Dn4VuW0MqNfuachJQUxBkfP JaNXo5R+Vm0Fb2n3mtUQ6RQQLvWSEyHsqFzr88sE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50756: nvme-pci: fix mempool alloc size Date: Wed, 24 Dec 2025 14:06:07 +0100 Message-ID: <2025122453-CVE-2022-50756-ce43@gregkh> X-Mailer: git-send-email 2.52.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=2960; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=eTFwJIkpfiTTzKCZxNFt7mYnP+AJ4kE0l7NGZh22FEE=; b=owGbwMvMwCRo6H6F97bub03G02pJDJneTw03rqidXnUl/c4lRgXfFN++yA7ezoSPSildp9l6M wvcrgd0xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwERuBjPMU9ZU2hbi+nYlT9G1 U8WvbnxQTLPoYpinYWm12e6wy6bzy2olezN08x6qvpsIAA== 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-pci: fix mempool alloc size Convert the max size to bytes to match the units of the divisor that calculates the worst-case number of PRP entries. The result is used to determine how many PRP Lists are required. The code was previously rounding this to 1 list, but we can require 2 in the worst case. In that scenario, the driver would corrupt memory beyond the size provided by the mempool. While unlikely to occur (you'd need a 4MB in exactly 127 phys segments on a queue that doesn't support SGLs), this memory corruption has been observed by kfence. The Linux kernel CVE team has assigned CVE-2022-50756 to this issue. Affected and fixed versions =========================== Issue introduced in 4.18 with commit 943e942e6266f22babee5efeb00f8f672fbff5bd and fixed in 5.10.163 with commit dfb6d54893d544151e7f480bc44cfe7823f5ad23 Issue introduced in 4.18 with commit 943e942e6266f22babee5efeb00f8f672fbff5bd and fixed in 5.15.87 with commit 9141144b37f30e3e7fa024bcfa0a13011e546ba9 Issue introduced in 4.18 with commit 943e942e6266f22babee5efeb00f8f672fbff5bd and fixed in 6.0.17 with commit e1777b4286e526c58b4ee699344b0ad85aaf83a0 Issue introduced in 4.18 with commit 943e942e6266f22babee5efeb00f8f672fbff5bd and fixed in 6.1.3 with commit b1814724e0d7162bdf4799f2d565381bc2251c63 Issue introduced in 4.18 with commit 943e942e6266f22babee5efeb00f8f672fbff5bd and fixed in 6.2 with commit c89a529e823d51dd23c7ec0c047c7a454a428541 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-50756 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/pci.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/dfb6d54893d544151e7f480bc44cfe7823f5ad23 https://git.kernel.org/stable/c/9141144b37f30e3e7fa024bcfa0a13011e546ba9 https://git.kernel.org/stable/c/e1777b4286e526c58b4ee699344b0ad85aaf83a0 https://git.kernel.org/stable/c/b1814724e0d7162bdf4799f2d565381bc2251c63 https://git.kernel.org/stable/c/c89a529e823d51dd23c7ec0c047c7a454a428541