{"id":"CVE-2023-54140","summary":"nilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nnilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse\n\nA syzbot stress test using a corrupted disk image reported that\nmark_buffer_dirty() called from __nilfs_mark_inode_dirty() or\nnilfs_palloc_commit_alloc_entry() may output a kernel warning, and can\npanic if the kernel is booted with panic_on_warn.\n\nThis is because nilfs2 keeps buffer pointers in local structures for some\nmetadata and reuses them, but such buffers may be forcibly discarded by\nnilfs_clear_dirty_page() in some critical situations.\n\nThis issue is reported to appear after commit 28a65b49eb53 (\"nilfs2: do\nnot write dirty data after degenerating to read-only\"), but the issue has\npotentially existed before.\n\nFix this issue by checking the uptodate flag when attempting to reuse an\ninternally held buffer, and reloading the metadata instead of reusing the\nbuffer if the flag was lost.","modified":"2026-03-31T17:29:30.351149Z","published":"2025-12-24T13:06:54.784Z","related":["SUSE-SU-2026:0263-1","SUSE-SU-2026:0278-1","SUSE-SU-2026:0281-1","SUSE-SU-2026:0293-1","SUSE-SU-2026:0315-1","SUSE-SU-2026:0317-1","SUSE-SU-2026:0411-1","SUSE-SU-2026:0617-1","SUSE-SU-2026:20477-1","SUSE-SU-2026:20498-1","SUSE-SU-2026:20845-1","SUSE-SU-2026:20876-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54140.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/46c11be2dca295742a5508ea910a77f7733fb7f4"},{"type":"WEB","url":"https://git.kernel.org/stable/c/473795610594f261e98920f0945550314df36f07"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4da07e958bfda2d69d83db105780e8916e3ac02e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/99a73016a5e12a09586a96f998e91f9ea145cd00"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b308b3eabc429649b5501d36290cea403fbd746c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b911bef132a06de01a745c6a24172d6db7216333"},{"type":"WEB","url":"https://git.kernel.org/stable/c/cdaac8e7e5a059f9b5e816cda257f08d0abffacd"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d95e403588738c7ec38f52b9f490b15e7745d393"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f1d637b63d8a27ac3386f186a694907f2717fc13"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54140.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-54140"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"8c26c4e2694a163d525976e804d81cd955bbb40c"},{"fixed":"473795610594f261e98920f0945550314df36f07"},{"fixed":"d95e403588738c7ec38f52b9f490b15e7745d393"},{"fixed":"99a73016a5e12a09586a96f998e91f9ea145cd00"},{"fixed":"f1d637b63d8a27ac3386f186a694907f2717fc13"},{"fixed":"b911bef132a06de01a745c6a24172d6db7216333"},{"fixed":"4da07e958bfda2d69d83db105780e8916e3ac02e"},{"fixed":"46c11be2dca295742a5508ea910a77f7733fb7f4"},{"fixed":"b308b3eabc429649b5501d36290cea403fbd746c"},{"fixed":"cdaac8e7e5a059f9b5e816cda257f08d0abffacd"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-54140.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.10.0"},{"fixed":"4.14.326"}]},{"type":"ECOSYSTEM","events":[{"introduced":"4.15.0"},{"fixed":"4.19.295"}]},{"type":"ECOSYSTEM","events":[{"introduced":"4.20.0"},{"fixed":"5.4.257"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.5.0"},{"fixed":"5.10.195"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.131"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.1.52"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.4.15"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.5.0"},{"fixed":"6.5.2"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-54140.json"}}],"schema_version":"1.7.5"}