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.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
8c26c4e2694a163d525976e804d81cd955bbb40c to < bd89073fc7a5d03b1d06b372addbe405e5a925f4affected8c26c4e2694a163d525976e804d81cd955bbb40c to < e9c5412c5972124776c1b873533eb39e287a4dfaaffected8c26c4e2694a163d525976e804d81cd955bbb40c to < 4569a292a84e340e97d178898ad1cfe1a3080a61affected8c26c4e2694a163d525976e804d81cd955bbb40c to < 7c3e662048053802f6b0db3a78e97f4e1f7edc4faffected8c26c4e2694a163d525976e804d81cd955bbb40c to < 13f73ef77baa4764dc1ca4fcbae9cade05b83866affected8c26c4e2694a163d525976e804d81cd955bbb40c to < a73201c607d8e506358d60aafddda4246bdd9350affected8c26c4e2694a163d525976e804d81cd955bbb40c to < 4005cec6847c06ee191583270b7cdd7e696543ccaffected8c26c4e2694a163d525976e804d81cd955bbb40c to < 55f7810632f993cff622a0ddbc7c865892294b61affected8c26c4e2694a163d525976e804d81cd955bbb40c to < 28a65b49eb53e172d23567005465019658bfdb4daffected
Linux Linux
Default version status: affected
3.10affected0 to < 3.10unaffected4.14.315 to ≤ 4.14.*unaffected4.19.283 to ≤ 4.19.*unaffected5.4.243 to ≤ 5.4.*unaffected5.10.180 to ≤ 5.10.*unaffected5.15.111 to ≤ 5.15.*unaffected6.1.28 to ≤ 6.1.*unaffected6.2.15 to ≤ 6.2.*unaffected6.3.2 to ≤ 6.3.*unaffected6.4 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/bd89073fc7a5d03b1d06b372addbe405e5a925f4 ↗
- https://git.kernel.org/stable/c/e9c5412c5972124776c1b873533eb39e287a4dfa ↗
- https://git.kernel.org/stable/c/4569a292a84e340e97d178898ad1cfe1a3080a61 ↗
- https://git.kernel.org/stable/c/7c3e662048053802f6b0db3a78e97f4e1f7edc4f ↗
- https://git.kernel.org/stable/c/13f73ef77baa4764dc1ca4fcbae9cade05b83866 ↗
- https://git.kernel.org/stable/c/a73201c607d8e506358d60aafddda4246bdd9350 ↗
- https://git.kernel.org/stable/c/4005cec6847c06ee191583270b7cdd7e696543cc ↗
- https://git.kernel.org/stable/c/55f7810632f993cff622a0ddbc7c865892294b61 ↗
- https://git.kernel.org/stable/c/28a65b49eb53e172d23567005465019658bfdb4d ↗