CVE-2023-53337

nilfs2: do not write dirty data after degenerating to read-only

State
Published
Severity
5.5 Medium
Published
Sep 17, 2025
Updated
May 11, 2026
Reserved
Sep 16, 2025

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.15.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HCISA-ADP

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 8c26c4e2694a163d525976e804d81cd955bbb40c to before bd89073fc7a5d03b1d06b372addbe405e5a925f4Affected
  • 8c26c4e2694a163d525976e804d81cd955bbb40c to before e9c5412c5972124776c1b873533eb39e287a4dfaAffected
  • 8c26c4e2694a163d525976e804d81cd955bbb40c to before 4569a292a84e340e97d178898ad1cfe1a3080a61Affected
  • 8c26c4e2694a163d525976e804d81cd955bbb40c to before 7c3e662048053802f6b0db3a78e97f4e1f7edc4fAffected
  • 8c26c4e2694a163d525976e804d81cd955bbb40c to before 13f73ef77baa4764dc1ca4fcbae9cade05b83866Affected
  • 8c26c4e2694a163d525976e804d81cd955bbb40c to before a73201c607d8e506358d60aafddda4246bdd9350Affected
  • 8c26c4e2694a163d525976e804d81cd955bbb40c to before 4005cec6847c06ee191583270b7cdd7e696543ccAffected
  • 8c26c4e2694a163d525976e804d81cd955bbb40c to before 55f7810632f993cff622a0ddbc7c865892294b61Affected
  • 8c26c4e2694a163d525976e804d81cd955bbb40c to before 28a65b49eb53e172d23567005465019658bfdb4dAffected
LinuxLinux
  • 3.10Affected
  • before 3.10Not affected
  • 4.14.315 through 4.14.*Not affected
  • 4.19.283 through 4.19.*Not affected
  • 5.4.243 through 5.4.*Not affected
  • 5.10.180 through 5.10.*Not affected
  • 5.15.111 through 5.15.*Not affected
  • 6.1.28 through 6.1.*Not affected
  • 6.2.15 through 6.2.*Not affected
  • 6.3.2 through 6.3.*Not affected
  • 6.4 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.