# CVE-2023-53337: nilfs2: do not write dirty data after degenerating to read-only

- Severity: Medium 5.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.22%, higher than 12% of CVEs (2026-12-01)
- Published: 2025-09-17T14:56:31.582Z
- Modified: 2026-06-17T06:44:55.900Z
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from 8c26c4e2694a163d525976e804d81cd955bbb40c before bd89073fc7a5d03b1d06b372addbe405e5a925f4; from 8c26c4e2694a163d525976e804d81cd955bbb40c before e9c5412c5972124776c1b873533eb39e287a4dfa; from 8c26c4e2694a163d525976e804d81cd955bbb40c before 4569a292a84e340e97d178898ad1cfe1a3080a61; from 8c26c4e2694a163d525976e804d81cd955bbb40c before 7c3e662048053802f6b0db3a78e97f4e1f7edc4f; from 8c26c4e2694a163d525976e804d81cd955bbb40c before 13f73ef77baa4764dc1ca4fcbae9cade05b83866; from 8c26c4e2694a163d525976e804d81cd955bbb40c before a73201c607d8e506358d60aafddda4246bdd9350; from 8c26c4e2694a163d525976e804d81cd955bbb40c before 4005cec6847c06ee191583270b7cdd7e696543cc; from 8c26c4e2694a163d525976e804d81cd955bbb40c before 55f7810632f993cff622a0ddbc7c865892294b61; from 8c26c4e2694a163d525976e804d81cd955bbb40c before 28a65b49eb53e172d23567005465019658bfdb4d; 3.10 (not affected: before 3.10; from 4.14.315 up to 4.14.*; from 4.19.283 up to 4.19.*; from 5.4.243 up to 5.4.*; from 5.10.180 up to 5.10.*; from 5.15.111 up to 5.15.*; from 6.1.28 up to 6.1.*; from 6.2.15 up to 6.2.*; from 6.3.2 up to 6.3.*; from 6.4 up to *)
- linux linux_kernel: before 4.14.315; from 4.15 before 4.19.283; from 4.20 before 5.4.243; from 5.5 before 5.10.180; from 5.11 before 5.15.111; from 5.16 before 6.1.28; from 6.2 before 6.2.15; from 6.3 before 6.3.2

## Every score

- CISA-ADP: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/bd89073fc7a5d03b1d06b372addbe405e5a925f4> (patch)
- <https://git.kernel.org/stable/c/e9c5412c5972124776c1b873533eb39e287a4dfa> (patch)
- <https://git.kernel.org/stable/c/4569a292a84e340e97d178898ad1cfe1a3080a61> (patch)
- <https://git.kernel.org/stable/c/7c3e662048053802f6b0db3a78e97f4e1f7edc4f> (patch)
- <https://git.kernel.org/stable/c/13f73ef77baa4764dc1ca4fcbae9cade05b83866> (patch)
- <https://git.kernel.org/stable/c/a73201c607d8e506358d60aafddda4246bdd9350> (patch)
- <https://git.kernel.org/stable/c/4005cec6847c06ee191583270b7cdd7e696543cc> (patch)
- <https://git.kernel.org/stable/c/55f7810632f993cff622a0ddbc7c865892294b61> (patch)
- <https://git.kernel.org/stable/c/28a65b49eb53e172d23567005465019658bfdb4d> (patch)

## Sources

- CVE List: [CVE-2023-53337](https://www.cve.org/CVERecord?id=CVE-2023-53337), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2023-53337](https://nvd.nist.gov/vuln/detail/CVE-2023-53337), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-53337 · Whole record: https://cve.day/CVE-2023-53337.json · Rebuilt by cve.day 2026-11-25T22:58:34.838Z
