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 6617734A789 for ; Wed, 24 Dec 2025 13:11:24 +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=1766581884; cv=none; b=jLBur/HcSu9wN99j0xcjD4wGR1EV7Pyp4FZ8p9OgImrrvX7TN0zetCSgo+aAk06j088Ocbuz6mVB+Qe29UbcnUNHWJhJ/vjbYNS+zpFo3/OoDUhc2O8EnmJpE1dOaI0JW3yfBS6ZCXU71lQZQtgQrXt5WkaHZiHsbCeQFVukm9c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766581884; c=relaxed/simple; bh=V8xbL3gC4KUv/6PyxRaaVNvFOBdZlBkRaWEEabOWcVc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EDx1et5XqkdLDK5GRHNGJIW5IkR2abyCEw4uinwgE+ZGXhq9o2UCJxWxzH/3B7qLkMjSZhyQwgsu0uipoVT64slvpAuRaOfMwlOmFBN9UEvWRC1x+RCgKiuhbfLgrHPXWeCN2gqlG++VidT/zuN3z43aBhizf9z0NWbvIJ6dpU0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=cJhb0zGW; 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="cJhb0zGW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7632C4CEFB; Wed, 24 Dec 2025 13:11:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1766581884; bh=V8xbL3gC4KUv/6PyxRaaVNvFOBdZlBkRaWEEabOWcVc=; h=From:To:Cc:Subject:Date:Reply-To:From; b=cJhb0zGWBSb8wdedO/qs+zJ0cvXBDBG2FSH0SiZvO24S6O7EoMxjhLv9dUIzFW514 UmIJ0WkNCr2wkzw1HrdN1/one8yrzyWxyEjpYeUqoafUnnAN3NWYKTrBVA/AcWy/aD E+H+kmdeYJ7T5f42veq19gHQl3g+hu9bM/xU/+G8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-54140: nilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse Date: Wed, 24 Dec 2025 14:07:37 +0100 Message-ID: <2025122423-CVE-2023-54140-4841@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4208; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Wi801hsomcP+DQYLSVbDIKA3As5+cCFkZg/Xo3VW/YE=; b=owGbwMvMwCRo6H6F97bub03G02pJDJneT/13GU4o3xqdwDrp3p9NAVnSCYbaKvOTNOurv5Sus p/6ItmpI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACZiv51hJqNh7HbVAAb9I/L1 554t4r519lLOToZ5ahzSt1Wss3PsNcNX+jkIh5Zv2HwQAA== 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: fix WARNING in mark_buffer_dirty due to discarded buffer reuse A syzbot stress test using a corrupted disk image reported that mark_buffer_dirty() called from __nilfs_mark_inode_dirty() or nilfs_palloc_commit_alloc_entry() may output a kernel warning, and can panic if the kernel is booted with panic_on_warn. This is because nilfs2 keeps buffer pointers in local structures for some metadata and reuses them, but such buffers may be forcibly discarded by nilfs_clear_dirty_page() in some critical situations. This issue is reported to appear after commit 28a65b49eb53 ("nilfs2: do not write dirty data after degenerating to read-only"), but the issue has potentially existed before. Fix this issue by checking the uptodate flag when attempting to reuse an internally held buffer, and reloading the metadata instead of reusing the buffer if the flag was lost. The Linux kernel CVE team has assigned CVE-2023-54140 to this issue. Affected and fixed versions =========================== Issue introduced in 3.10 with commit 8c26c4e2694a163d525976e804d81cd955bbb40c and fixed in 4.14.326 with commit 473795610594f261e98920f0945550314df36f07 Issue introduced in 3.10 with commit 8c26c4e2694a163d525976e804d81cd955bbb40c and fixed in 4.19.295 with commit d95e403588738c7ec38f52b9f490b15e7745d393 Issue introduced in 3.10 with commit 8c26c4e2694a163d525976e804d81cd955bbb40c and fixed in 5.4.257 with commit 99a73016a5e12a09586a96f998e91f9ea145cd00 Issue introduced in 3.10 with commit 8c26c4e2694a163d525976e804d81cd955bbb40c and fixed in 5.10.195 with commit f1d637b63d8a27ac3386f186a694907f2717fc13 Issue introduced in 3.10 with commit 8c26c4e2694a163d525976e804d81cd955bbb40c and fixed in 5.15.131 with commit b911bef132a06de01a745c6a24172d6db7216333 Issue introduced in 3.10 with commit 8c26c4e2694a163d525976e804d81cd955bbb40c and fixed in 6.1.52 with commit 4da07e958bfda2d69d83db105780e8916e3ac02e Issue introduced in 3.10 with commit 8c26c4e2694a163d525976e804d81cd955bbb40c and fixed in 6.4.15 with commit 46c11be2dca295742a5508ea910a77f7733fb7f4 Issue introduced in 3.10 with commit 8c26c4e2694a163d525976e804d81cd955bbb40c and fixed in 6.5.2 with commit b308b3eabc429649b5501d36290cea403fbd746c Issue introduced in 3.10 with commit 8c26c4e2694a163d525976e804d81cd955bbb40c and fixed in 6.6 with commit cdaac8e7e5a059f9b5e816cda257f08d0abffacd 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-54140 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/alloc.c fs/nilfs2/inode.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/473795610594f261e98920f0945550314df36f07 https://git.kernel.org/stable/c/d95e403588738c7ec38f52b9f490b15e7745d393 https://git.kernel.org/stable/c/99a73016a5e12a09586a96f998e91f9ea145cd00 https://git.kernel.org/stable/c/f1d637b63d8a27ac3386f186a694907f2717fc13 https://git.kernel.org/stable/c/b911bef132a06de01a745c6a24172d6db7216333 https://git.kernel.org/stable/c/4da07e958bfda2d69d83db105780e8916e3ac02e https://git.kernel.org/stable/c/46c11be2dca295742a5508ea910a77f7733fb7f4 https://git.kernel.org/stable/c/b308b3eabc429649b5501d36290cea403fbd746c https://git.kernel.org/stable/c/cdaac8e7e5a059f9b5e816cda257f08d0abffacd