CVE-2023-54140
nilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse
Check your servers for CVE-2023-54140
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2023-54140 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.17%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 7.06% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 8c26c4e2694a163d525976e804d81cd955bbb40c, before 473795610594f261e98920f0945550314df36f07 affected from 8c26c4e2694a163d525976e804d81cd955bbb40c, before d95e403588738c7ec38f52b9f490b15e7745d393 affected from 8c26c4e2694a163d525976e804d81cd955bbb40c, before 99a73016a5e12a09586a96f998e91f9ea145cd00 affected from 8c26c4e2694a163d525976e804d81cd955bbb40c, before f1d637b63d8a27ac3386f186a694907f2717fc13 affected from 8c26c4e2694a163d525976e804d81cd955bbb40c, before b911bef132a06de01a745c6a24172d6db7216333 affected from 8c26c4e2694a163d525976e804d81cd955bbb40c, before 4da07e958bfda2d69d83db105780e8916e3ac02e affected from 8c26c4e2694a163d525976e804d81cd955bbb40c, before 46c11be2dca295742a5508ea910a77f7733fb7f4 affected from 8c26c4e2694a163d525976e804d81cd955bbb40c, before b308b3eabc429649b5501d36290cea403fbd746c affected from 8c26c4e2694a163d525976e804d81cd955bbb40c, before cdaac8e7e5a059f9b5e816cda257f08d0abffacd
Other versions: unaffected
|
| Linux |
affected 3.10 unaffected before 3.10 unaffected from 4.14.326 up to and including 4.14.* unaffected from 4.19.295 up to and including 4.19.* unaffected from 5.4.257 up to and including 5.4.* unaffected from 5.10.195 up to and including 5.10.* unaffected from 5.15.131 up to and including 5.15.* unaffected from 6.1.52 up to and including 6.1.* unaffected from 6.4.15 up to and including 6.4.* unaffected from 6.5.2 up to and including 6.5.* unaffected 6.6 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2023-54140 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2023-54140
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2023-54140
trivy image --scanners vuln IMAGE | grep CVE-2023-54140
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/473795610594f261e98920f0945550314df36f07 git.kernel.org
- https://git.kernel.org/stable/c/d95e403588738c7ec38f52b9f490b15e7745d393 git.kernel.org
- https://git.kernel.org/stable/c/99a73016a5e12a09586a96f998e91f9ea145cd00 git.kernel.org
- https://git.kernel.org/stable/c/f1d637b63d8a27ac3386f186a694907f2717fc13 git.kernel.org
- https://git.kernel.org/stable/c/b911bef132a06de01a745c6a24172d6db7216333 git.kernel.org
- https://git.kernel.org/stable/c/4da07e958bfda2d69d83db105780e8916e3ac02e git.kernel.org
- https://git.kernel.org/stable/c/46c11be2dca295742a5508ea910a77f7733fb7f4 git.kernel.org
- https://git.kernel.org/stable/c/b308b3eabc429649b5501d36290cea403fbd746c git.kernel.org
- https://git.kernel.org/stable/c/cdaac8e7e5a059f9b5e816cda257f08d0abffacd git.kernel.org
Source: the record CVE-2023-54140 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse