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 AF16F72614 for ; Tue, 16 Sep 2025 16:14:20 +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=1758039260; cv=none; b=AHQnBeALHybcqbGiQaAmRMHKLMxHZWWBotKbMYA0OSG/SCzpMr9dsROCjx+SADsFxWMOeZDBf8kFqq1HD4xECN9ri487s1h3+MuK/W3rNEWZHUizB3i8b9gbfMEGE51Kkg21EIdAe4gd8O6urxB/J5fq7cSaHq3UA2sOOOXCfJY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758039260; c=relaxed/simple; bh=ckQ4vkU2XZYvbBAgOgVgj6Ju1KeJ7DAYkQn1lN7Kn00=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rZAJutzqdLh5FyBalWbkpoRlXHiPoYkYMnD8BJAnntF7IL6R/yf4jMB8/9jxJabdSPWLv8moYK6KMiSb+s0SnlekmcczCO6uIg2Nb9NFxMY/nC2t7FdQ+1Yy4Iy/PX0qPNVEmgRuQOX5CNhJVq4jgmY4NvGir1BQnYOilxoxJjE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=UVc0E8UB; 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="UVc0E8UB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2FA5CC4CEEB; Tue, 16 Sep 2025 16:14:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758039260; bh=ckQ4vkU2XZYvbBAgOgVgj6Ju1KeJ7DAYkQn1lN7Kn00=; h=From:To:Cc:Subject:Date:Reply-to:From; b=UVc0E8UBU5LVBr+bZuD3VJX03XpEqQBfkm/ivd5OPXuKcRBaXvtg8mOLm+9HUy+IG ot4TMbON9ICt66k8L/794EjSDCp7XcBVByaNMNcLvzh0OFR02hoHhHo942scyOpQ/P h9SMqTzIF9D7bWn6Ib193CqMNV2R7qqvobqYu/eA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53320: scsi: mpi3mr: Fix issues in mpi3mr_get_all_tgt_info() Date: Tue, 16 Sep 2025 18:12:05 +0200 Message-ID: <2025091644-CVE-2023-53320-d419@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=2840; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=e4HIJHhOGZIOn+KvbaBR8u44I2AGSMXwh+8KiE/Ihg8=; b=owGbwMvMwCRo6H6F97bub03G02pJDBknexyMRU9ypM8/GfIyRd9qtuI6zsX/KkKu/vt+Z/4Eo 2sK5pOKO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAi9awM85QXblhr9LMyLO2j /+Q1v8wZdW3LfBkWXPp5lGPerNjpmrJJF889lNmetv7yJwA= 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: scsi: mpi3mr: Fix issues in mpi3mr_get_all_tgt_info() The function mpi3mr_get_all_tgt_info() has four issues: 1) It calculates valid entry length in alltgt_info assuming the header part of the struct mpi3mr_device_map_info would equal to sizeof(u32). The correct size is sizeof(u64). 2) When it calculates the valid entry length kern_entrylen, it excludes one entry by subtracting 1 from num_devices. 3) It copies num_device by calling memcpy(). Substitution is enough. 4) It does not specify the calculated length to sg_copy_from_buffer(). Instead, it specifies the payload length which is larger than the alltgt_info size. It causes "BUG: KASAN: slab-out-of-bounds". Fix the issues by using the correct header size, removing the subtraction from num_devices, replacing the memcpy() with substitution and specifying the correct length to sg_copy_from_buffer(). The Linux kernel CVE team has assigned CVE-2023-53320 to this issue. Affected and fixed versions =========================== Issue introduced in 5.19 with commit f5e6d5a343761081317c89d23489c93fbafc69ff and fixed in 6.1.16 with commit 8ba997b22f2cd5d29aad8c39f6201f7608ed0c04 Issue introduced in 5.19 with commit f5e6d5a343761081317c89d23489c93fbafc69ff and fixed in 6.2.3 with commit 2f3d3fa5b8ed7d3b147478f42b00b468eeb1ecd2 Issue introduced in 5.19 with commit f5e6d5a343761081317c89d23489c93fbafc69ff and fixed in 6.3 with commit fb428a2005fc1260d18b989cc5199f281617f44d 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-53320 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/scsi/mpi3mr/mpi3mr_app.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/8ba997b22f2cd5d29aad8c39f6201f7608ed0c04 https://git.kernel.org/stable/c/2f3d3fa5b8ed7d3b147478f42b00b468eeb1ecd2 https://git.kernel.org/stable/c/fb428a2005fc1260d18b989cc5199f281617f44d