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 A784F337E80 for ; Wed, 17 Sep 2025 14:59:19 +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=1758121159; cv=none; b=QQ5yqm+S3eW7CMNBxDTbPkdR+gK4Ddu6IkEXq92PctJsbmnZxopFxyKF6oUgDq7iYBEnOeq4Go2Rg7djzda16iiUdeEDUd5G0RGSl1kenDmDny5meoxm4BLNP2NE4K7+unGCf4pv1TvJ6Lj5s0dYOyq4c2NFJE/tkJDTUfYtbsw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758121159; c=relaxed/simple; bh=DMPJGymS7CNDnARcsy+3detF0U1buz4VK/unbVC81Y0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Uu/h4RkId2Ds363nnX4hWaccOG7Eg1lu7W7Vb9lx5JfDZ3CVhq0TDvMcTnTgG2Vx5FY+v7Ub+YUJXl09lwqxaIJzlEyiHLgHNQzK4FGM3cB1fFORpuPY0VCQ5WWiU+JADoHAUUAU/+zlhyspAna8mSDDspnaZiewjyPYj1pwYI0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jeTB35Gb; 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="jeTB35Gb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26282C4CEE7; Wed, 17 Sep 2025 14:59:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758121159; bh=DMPJGymS7CNDnARcsy+3detF0U1buz4VK/unbVC81Y0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=jeTB35GbbL6ZVvaASbRByW9Y39hXVYFD2PWJ5krKPXpy7qUVsxbY/LezOV17BFRN5 i4yd6P4hlXfQdEv5kJIfhd/D47Ae9xExYCHvKMGVBGCne9fTUVi6X/YMc9irMv18sG BE1gBsTXiq3qdau00ap+8/m16r2SlKmjb4V+8+Gg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53357: md/raid10: check slab-out-of-bounds in md_bitmap_get_counter Date: Wed, 17 Sep 2025 16:56:56 +0200 Message-ID: <2025091721-CVE-2023-53357-15aa@gregkh> X-Mailer: git-send-email 2.51.0 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=3517; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=DULUTyBU6vgzguvx1D6qfZbZTlU521EABtdu3XAtZEs=; b=owGbwMvMwCRo6H6F97bub03G02pJDBmnzohmOmi8kmU57bTW9+rkV4fmfXe5LX23fObVgFvsO vlzwt9d6ohlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJJNcxzLP8k3Vok2qku8eZ F/VMrgt+LEu5aMKwoPHEafnwa8YB07gkdM9/CV60OXp1LQA= 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: md/raid10: check slab-out-of-bounds in md_bitmap_get_counter If we write a large number to md/bitmap_set_bits, md_bitmap_checkpage() will return -EINVAL because 'page >= bitmap->pages', but the return value was not checked immediately in md_bitmap_get_counter() in order to set *blocks value and slab-out-of-bounds occurs. Move check of 'page >= bitmap->pages' to md_bitmap_get_counter() and return directly if true. The Linux kernel CVE team has assigned CVE-2023-53357 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.36 with commit ef4256733506f2459a0c436b62267d22a3f0cec6 and fixed in 4.19.291 with commit 374fb914304d9b500721007f3837ea8f1f9a2418 Issue introduced in 2.6.36 with commit ef4256733506f2459a0c436b62267d22a3f0cec6 and fixed in 5.4.251 with commit b0b971fe7d61411ede63c3291764dbde1577ef2c Issue introduced in 2.6.36 with commit ef4256733506f2459a0c436b62267d22a3f0cec6 and fixed in 5.10.188 with commit 39fa14e824acfd470db4f42c354297456bd82b53 Issue introduced in 2.6.36 with commit ef4256733506f2459a0c436b62267d22a3f0cec6 and fixed in 5.15.121 with commit a134dd582c0d5b6068efa308bd485cf1d00b3f65 Issue introduced in 2.6.36 with commit ef4256733506f2459a0c436b62267d22a3f0cec6 and fixed in 6.1.39 with commit be1a3ec63a840cc9e59a033acf154f56255699a1 Issue introduced in 2.6.36 with commit ef4256733506f2459a0c436b62267d22a3f0cec6 and fixed in 6.3.13 with commit 152bb26796ff054af50b2ee1b3ca56e364e4f61b Issue introduced in 2.6.36 with commit ef4256733506f2459a0c436b62267d22a3f0cec6 and fixed in 6.4.4 with commit bea301c046110bf421a3ce153fb868cb8d618e90 Issue introduced in 2.6.36 with commit ef4256733506f2459a0c436b62267d22a3f0cec6 and fixed in 6.5 with commit 301867b1c16805aebbc306aafa6ecdc68b73c7e5 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-2023-53357 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/md/md-bitmap.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/374fb914304d9b500721007f3837ea8f1f9a2418 https://git.kernel.org/stable/c/b0b971fe7d61411ede63c3291764dbde1577ef2c https://git.kernel.org/stable/c/39fa14e824acfd470db4f42c354297456bd82b53 https://git.kernel.org/stable/c/a134dd582c0d5b6068efa308bd485cf1d00b3f65 https://git.kernel.org/stable/c/be1a3ec63a840cc9e59a033acf154f56255699a1 https://git.kernel.org/stable/c/152bb26796ff054af50b2ee1b3ca56e364e4f61b https://git.kernel.org/stable/c/bea301c046110bf421a3ce153fb868cb8d618e90 https://git.kernel.org/stable/c/301867b1c16805aebbc306aafa6ecdc68b73c7e5