CVE-2023-54140

Source
https://cve.org/CVERecord?id=CVE-2023-54140
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-54140.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2023-54140
Downstream
Related
Published
2025-12-24T13:06:54.784Z
Modified
2026-03-31T17:29:30.351149489Z
Summary
nilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse
Details

In the Linux kernel, the following vulnerability has been resolved:

nilfs2: fix WARNING in markbufferdirty due to discarded buffer reuse

A syzbot stress test using a corrupted disk image reported that markbufferdirty() called from _nilfsmarkinodedirty() or nilfspalloccommitallocentry() may output a kernel warning, and can panic if the kernel is booted with paniconwarn.

This is because nilfs2 keeps buffer pointers in local structures for some metadata and reuses them, but such buffers may be forcibly discarded by nilfscleardirty_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.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54140.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / 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"

Linux / Kernel

Package

Name
Kernel

Affected 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"