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 83E1A32E75F for ; Wed, 17 Sep 2025 14:57:34 +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=1758121054; cv=none; b=hAWJ4QuzWwfv8dn3Wf7MHK+5K43WyfneUSUMCALydD6vEAGgSpYtfS8XeUuK6IbhG+4zaNYvWvxfmkgYeoRrlfbzETYdHkpK+Ed9IIbC3ALyBKg8mCLXA6B91RR4kbZJ/O0Bc0uXnwSUsSyFINodQotcKUES3XvYnLrGbWMF1rI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758121054; c=relaxed/simple; bh=TUXqNAvVyypvYSkqcqWpQoLD3+tREgFPYxDNUbuB4ZY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=AbpEbyBoklJxYILyOoReygFQrbVCUtLKvRP+o6JN5Zdc4xKG9MCR6L7FedMcAkSP3Qd1AYSaZrR2Yc8J5BWgKEZ4ZmKIedY5uqJ5tS9xKQukVoX30VkD/41cbwjOi/OtoXFychrCHjahedR2OCGXLkKjZO8jsVV89Kk5T4BoPQE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qOs6ibP2; 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="qOs6ibP2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01858C4CEE7; Wed, 17 Sep 2025 14:57:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758121054; bh=TUXqNAvVyypvYSkqcqWpQoLD3+tREgFPYxDNUbuB4ZY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=qOs6ibP2oXhsumx/QPoHo1I3xk0Kfyk6P/5yAstG4MaTu1WqEaECFF6Rv5hFppIqS Vl1OCaMFTerfx+S4/Lu3u14OOKwJCK2Rz4iTHgVZxdPjzZfvO/V3cad9+F/n3wRAUr eSJKecw77xZAUeM8ULG71pceLHKxHIRbHPEwcl2Q= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53337: nilfs2: do not write dirty data after degenerating to read-only Date: Wed, 17 Sep 2025 16:56:36 +0200 Message-ID: <2025091718-CVE-2023-53337-ac33@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=3596; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=2OwVL+F8Jy17dX6/i/Byn5R7yTikehv+/xsr/nnpOa4=; b=owGbwMvMwCRo6H6F97bub03G02pJDBmnzghJnhTKuVnyWG3x+qOhcpMbY/yrbncZ3lqy77xKJ OuLE5eNOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiEy4zzM9K3vgtyp21/Ez7 C8eSxR+831nd8GCYX2PSlj7t8K3jxgdFH/Jvy2z680F0LwA= 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: nilfs2: do not write dirty data after degenerating to read-only According to syzbot's report, mark_buffer_dirty() called from nilfs_segctor_do_construct() outputs a warning with some patterns after nilfs2 detects metadata corruption and degrades to read-only mode. After such read-only degeneration, page cache data may be cleared through nilfs_clear_dirty_page() which may also clear the uptodate flag for their buffer heads. However, even after the degeneration, log writes are still performed by unmount processing etc., which causes mark_buffer_dirty() to be called for buffer heads without the "uptodate" flag and causes the warning. Since any writes should not be done to a read-only file system in the first place, this fixes the warning in mark_buffer_dirty() by letting nilfs_segctor_do_construct() abort early if in read-only mode. This also changes the retry check of nilfs_segctor_write_out() to avoid unnecessary log write retries if it detects -EROFS that nilfs_segctor_do_construct() returned. The Linux kernel CVE team has assigned CVE-2023-53337 to this issue. Affected and fixed versions =========================== Fixed in 4.14.315 with commit bd89073fc7a5d03b1d06b372addbe405e5a925f4 Fixed in 4.19.283 with commit e9c5412c5972124776c1b873533eb39e287a4dfa Fixed in 5.4.243 with commit 4569a292a84e340e97d178898ad1cfe1a3080a61 Fixed in 5.10.180 with commit 7c3e662048053802f6b0db3a78e97f4e1f7edc4f Fixed in 5.15.111 with commit 13f73ef77baa4764dc1ca4fcbae9cade05b83866 Fixed in 6.1.28 with commit a73201c607d8e506358d60aafddda4246bdd9350 Fixed in 6.2.15 with commit 4005cec6847c06ee191583270b7cdd7e696543cc Fixed in 6.3.2 with commit 55f7810632f993cff622a0ddbc7c865892294b61 Fixed in 6.4 with commit 28a65b49eb53e172d23567005465019658bfdb4d 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-53337 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/nilfs2/segment.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/bd89073fc7a5d03b1d06b372addbe405e5a925f4 https://git.kernel.org/stable/c/e9c5412c5972124776c1b873533eb39e287a4dfa https://git.kernel.org/stable/c/4569a292a84e340e97d178898ad1cfe1a3080a61 https://git.kernel.org/stable/c/7c3e662048053802f6b0db3a78e97f4e1f7edc4f https://git.kernel.org/stable/c/13f73ef77baa4764dc1ca4fcbae9cade05b83866 https://git.kernel.org/stable/c/a73201c607d8e506358d60aafddda4246bdd9350 https://git.kernel.org/stable/c/4005cec6847c06ee191583270b7cdd7e696543cc https://git.kernel.org/stable/c/55f7810632f993cff622a0ddbc7c865892294b61 https://git.kernel.org/stable/c/28a65b49eb53e172d23567005465019658bfdb4d