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 7FBB1327A0C for ; Mon, 15 Sep 2025 14:27:07 +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=1757946427; cv=none; b=tPbV2D3AmXp/Je0wqOtvfq+BDyLm0L9iaqbV56omrc/frly//lgHYHdQ2gcqEUkOPAUm8JIrUL8tN/Grx/uj8qX65heNbwTdX/tinem917z3lU1hm98JMfVIe74/l5gBs/ztCB4IXVdDYxo2MoZ0zgCKEN8p3q/ML4ilK78tAZk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757946427; c=relaxed/simple; bh=fIy+zpbryWYDOEz9t7sbfNjTMTy9QUclsNF0IkEeZl8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=KWPc0lQxuYnTRO4Eee/uHsg+tANXhkT2i8+pvw/04rCO74CCTRkiueFtQupMMeUGuLIfEdbhQkvcER6rQQgnoZApm1JbXyLo7/6CtVSEupKzz5Dp3BdCVbHAI4ObZKGsulOG/R75dKiFBayXcnqGJailURswych5FvSiwITdiek= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=V3QhZlfH; 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="V3QhZlfH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7440C4CEF9; Mon, 15 Sep 2025 14:27:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757946427; bh=fIy+zpbryWYDOEz9t7sbfNjTMTy9QUclsNF0IkEeZl8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=V3QhZlfH6GopUCbXGfn3KFlzJs3rZmtEjJrkuGH1tveG/XQTHZwS3wdXud2Or6V95 4VGE+FKW7kl+po7jF6VDsHj6giPdrk+B5nFI/ak0DLDNYQkT3JhICwbLyvqmdnBJIL rC0THKHdaYPwsoVhOn4TnZDicI4aJt0JPM3DOGGw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53222: jfs: jfs_dmap: Validate db_l2nbperpage while mounting Date: Mon, 15 Sep 2025 16:21:56 +0200 Message-ID: <2025091513-CVE-2023-53222-c1a9@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=3187; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=NW7f+QnFSc0sHILdibSiFJRmDKxkHLo0zC20F+eblYk=; b=owGbwMvMwCRo6H6F97bub03G02pJDBknFG6+fCypucXNd63Vvs670lOXCfAwM8xPCX4S/sjJz FZAJIutI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbC5cKwYPaTWxeE9l5YZnD/ xvOC5z+qfHe1MTMsuB45bfWR8+aRqe1HVG1LebaFxYTzAwA= 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: jfs: jfs_dmap: Validate db_l2nbperpage while mounting In jfs_dmap.c at line 381, BLKTODMAP is used to get a logical block number inside dbFree(). db_l2nbperpage, which is the log2 number of blocks per page, is passed as an argument to BLKTODMAP which uses it for shifting. Syzbot reported a shift out-of-bounds crash because db_l2nbperpage is too big. This happens because the large value is set without any validation in dbMount() at line 181. Thus, make sure that db_l2nbperpage is correct while mounting. Max number of blocks per page = Page size / Min block size => log2(Max num_block per page) = log2(Page size / Min block size) = log2(Page size) - log2(Min block size) => Max db_l2nbperpage = L2PSIZE - L2MINBLOCKSIZE The Linux kernel CVE team has assigned CVE-2023-53222 to this issue. Affected and fixed versions =========================== Fixed in 4.14.322 with commit 8c1efe3f74a7864461b0dff281c5562154b4aa8e Fixed in 4.19.291 with commit ef5c205b6e6f8d1f18ef0b4a9832b1b5fa85f7f2 Fixed in 5.4.251 with commit a4855aeb13e4ad1f23e16753b68212e180f7d848 Fixed in 5.10.188 with commit 47b7eaae08e8b2f25bdf37bc14d21be090bcb20f Fixed in 5.15.121 with commit de984faecddb900fa850af4df574a25b32bb93f5 Fixed in 6.1.40 with commit c7feb54b113802d2aba98708769d3c33fb017254 Fixed in 6.4.5 with commit 2a03c4e683d33d17b667418eb717b13dda1fac6b Fixed in 6.5 with commit 11509910c599cbd04585ec35a6d5e1a0053d84c1 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-53222 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: fs/jfs/jfs_dmap.c fs/jfs/jfs_filsys.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/8c1efe3f74a7864461b0dff281c5562154b4aa8e https://git.kernel.org/stable/c/ef5c205b6e6f8d1f18ef0b4a9832b1b5fa85f7f2 https://git.kernel.org/stable/c/a4855aeb13e4ad1f23e16753b68212e180f7d848 https://git.kernel.org/stable/c/47b7eaae08e8b2f25bdf37bc14d21be090bcb20f https://git.kernel.org/stable/c/de984faecddb900fa850af4df574a25b32bb93f5 https://git.kernel.org/stable/c/c7feb54b113802d2aba98708769d3c33fb017254 https://git.kernel.org/stable/c/2a03c4e683d33d17b667418eb717b13dda1fac6b https://git.kernel.org/stable/c/11509910c599cbd04585ec35a6d5e1a0053d84c1