commit | d013eadd440085609f9d97c64263e8122bad2c48 | [log] [tgz] |
---|---|---|
author | Jan Kara <[email protected]> | Mon Aug 05 22:12:41 2024 +0200 |
committer | Anil Altinay <[email protected]> | Fri Dec 13 11:25:01 2024 -0800 |
tree | e1cee4bc6dc4931a8ddfd1fefb15070c8aa9962f | |
parent | 1720639d88553081f5653931fa1895c7c7872604 [diff] |
ext4: don't set SB_RDONLY after filesystem errors [ Upstream commit d3476f3dad4ad68ae5f6b008ea6591d1520da5d8 ] When the filesystem is mounted with errors=remount-ro, we were setting SB_RDONLY flag to stop all filesystem modifications. We knew this misses proper locking (sb->s_umount) and does not go through proper filesystem remount procedure but it has been the way this worked since early ext2 days and it was good enough for catastrophic situation damage mitigation. Recently, syzbot has found a way (see link) to trigger warnings in filesystem freezing because the code got confused by SB_RDONLY changing under its hands. Since these days we set EXT4_FLAGS_SHUTDOWN on the superblock which is enough to stop all filesystem modifications, modifying SB_RDONLY shouldn't be needed. So stop doing that. BUG=b/383720392 TEST=presubmit RELEASE_NOTE=Fixed CVE-2024-50191 in the Linux kernel. cos-patch: security-moderate Link: https://lore.kernel.org/all/[email protected] Reported-by: Christian Brauner <[email protected]> Change-Id: Id9945f7bfb5e45de91971ca2e915270b60d96dbc Signed-off-by: Jan Kara <[email protected]> Reviewed-by: Christian Brauner <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Theodore Ts'o <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Kernel CVE Triage Automation <[email protected]> Reviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/88599 Tested-by: Cusky Presubmit Bot <[email protected]> Reviewed-by: Kevin Berry <[email protected]> Reviewed-by: Anil Altinay <[email protected]>