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 A247226E6F6 for ; Sat, 4 Oct 2025 15:20:03 +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=1759591203; cv=none; b=n0FIo4Yhi5svrk77HXHtl8FrYnN+Mnievjcprb/BQ9D7GZ9ild2Z+JVOD3OOsdELo8SNxpM8W0xgoxAl9A0iT6igGi/zsG5kH1WtW5WJ5U+3P97N/HO5lfL38Q1e7B+7KEdUVKzrdK+ys4horsXV85fZDl2nEffHhVkcEMZQ/J8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759591203; c=relaxed/simple; bh=tAAlCLonitYxUNRPisaMUnM8RRKb5dG3euQLH8ua8No=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=c+vjxm86WiT7iObSBpX1uwjGz8OQgZwYZ69MZqi3GX/5lHQEvvhiVD/avJwa4k6dxCuqZ4Dh1OHMuP9RGsDqScwQ5cF1Ru0OiAbEAq1szYEtvMpipDt8ty7koonj3sfLmjuSfY7EoQzOtmiogyPEPKO3jXQu+dXAr847Ar6chBA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=p+oe+DZ2; 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="p+oe+DZ2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A373C4CEF1; Sat, 4 Oct 2025 15:20:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759591203; bh=tAAlCLonitYxUNRPisaMUnM8RRKb5dG3euQLH8ua8No=; h=From:To:Cc:Subject:Date:Reply-to:From; b=p+oe+DZ2BRi6bhifz4criW4TcGKdGA6rjCO4jkAMJuP2pcE+nc6cVCyBRGaNC73wB MfhGmCEiPmKCAuho2w4izXt85Q+gfuangFDpqsHgIOyf5TEi5jwXv+nFrfM7zGDo4h piRqkhhm9E5Z0P1bVDlp7+8EcbIYtc61Ea0DAUaY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53564: ocfs2: fix defrag path triggering jbd2 ASSERT Date: Sat, 4 Oct 2025 17:17:18 +0200 Message-ID: <2025100451-CVE-2023-53564-e874@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=4619; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=caH+f35FYMxxr06obSXQzjdgya2LZ19ZjzVJXtJy0zE=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkPrZKXaaqo3DS+siO15dRr5aIruW4OM/+e2s69W9X7W uZRyXMTO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiZ5gYFtyU5ZQ33uygGBfP s8N8q/syk8CS4wwLJpuYSpnukgzi2tOi4usV6zlZM9wbAA== 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: ocfs2: fix defrag path triggering jbd2 ASSERT code path: ocfs2_ioctl_move_extents ocfs2_move_extents ocfs2_defrag_extent __ocfs2_move_extent + ocfs2_journal_access_di + ocfs2_split_extent //sub-paths call jbd2_journal_restart + ocfs2_journal_dirty //crash by jbs2 ASSERT crash stacks: PID: 11297 TASK: ffff974a676dcd00 CPU: 67 COMMAND: "defragfs.ocfs2" #0 [ffffb25d8dad3900] machine_kexec at ffffffff8386fe01 #1 [ffffb25d8dad3958] __crash_kexec at ffffffff8395959d #2 [ffffb25d8dad3a20] crash_kexec at ffffffff8395a45d #3 [ffffb25d8dad3a38] oops_end at ffffffff83836d3f #4 [ffffb25d8dad3a58] do_trap at ffffffff83833205 #5 [ffffb25d8dad3aa0] do_invalid_op at ffffffff83833aa6 #6 [ffffb25d8dad3ac0] invalid_op at ffffffff84200d18 [exception RIP: jbd2_journal_dirty_metadata+0x2ba] RIP: ffffffffc09ca54a RSP: ffffb25d8dad3b70 RFLAGS: 00010207 RAX: 0000000000000000 RBX: ffff9706eedc5248 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffff97337029ea28 RDI: ffff9706eedc5250 RBP: ffff9703c3520200 R8: 000000000f46b0b2 R9: 0000000000000000 R10: 0000000000000001 R11: 00000001000000fe R12: ffff97337029ea28 R13: 0000000000000000 R14: ffff9703de59bf60 R15: ffff9706eedc5250 ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018 #7 [ffffb25d8dad3ba8] ocfs2_journal_dirty at ffffffffc137fb95 [ocfs2] #8 [ffffb25d8dad3be8] __ocfs2_move_extent at ffffffffc139a950 [ocfs2] #9 [ffffb25d8dad3c80] ocfs2_defrag_extent at ffffffffc139b2d2 [ocfs2] Analysis This bug has the same root cause of 'commit 7f27ec978b0e ("ocfs2: call ocfs2_journal_access_di() before ocfs2_journal_dirty() in ocfs2_write_end_nolock()")'. For this bug, jbd2_journal_restart() is called by ocfs2_split_extent() during defragmenting. How to fix For ocfs2_split_extent() can handle journal operations totally by itself. Caller doesn't need to call journal access/dirty pair, and caller only needs to call journal start/stop pair. The fix method is to remove journal access/dirty from __ocfs2_move_extent(). The discussion for this patch: https://oss.oracle.com/pipermail/ocfs2-devel/2023-February/000647.html The Linux kernel CVE team has assigned CVE-2023-53564 to this issue. Affected and fixed versions =========================== Fixed in 4.14.308 with commit 5f43d34a51ed30e6a60f7e59d224a63014fe2cd5 Fixed in 4.19.276 with commit 7f3b1c28e2908755fb248d3ee8ff56826f2387db Fixed in 5.4.235 with commit 669134a66d37258e1c4a5cfbd5b82f547ae30fca Fixed in 5.10.173 with commit 2c559b3ba8e0b9e3c4bb08159a28ccadc698410f Fixed in 5.15.99 with commit 33665d1042666f2e5c736a3df1f453e31f030663 Fixed in 6.1.16 with commit 8163ea90d89b7012dd1fa4b28edf5db0c641eca7 Fixed in 6.2.3 with commit 590507ebabd33cd93324c04f9a5538309a5ba934 Fixed in 6.3 with commit 60eed1e3d45045623e46944ebc7c42c30a4350f0 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-53564 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/ocfs2/move_extents.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/5f43d34a51ed30e6a60f7e59d224a63014fe2cd5 https://git.kernel.org/stable/c/7f3b1c28e2908755fb248d3ee8ff56826f2387db https://git.kernel.org/stable/c/669134a66d37258e1c4a5cfbd5b82f547ae30fca https://git.kernel.org/stable/c/2c559b3ba8e0b9e3c4bb08159a28ccadc698410f https://git.kernel.org/stable/c/33665d1042666f2e5c736a3df1f453e31f030663 https://git.kernel.org/stable/c/8163ea90d89b7012dd1fa4b28edf5db0c641eca7 https://git.kernel.org/stable/c/590507ebabd33cd93324c04f9a5538309a5ba934 https://git.kernel.org/stable/c/60eed1e3d45045623e46944ebc7c42c30a4350f0