Description
In the Linux kernel, the following vulnerability has been resolved: fs: Protect reconfiguration of sb read-write from racing writes The reconfigure / remount code takes a lot of effort to protect filesystem's reconfiguration code from racing writes on remounting read-only. However during remounting read-only filesystem to read-write mode userspace writes can start immediately once we clear SB_RDONLY flag. This is inconvenient for example for ext4 because we need to do some writes to the filesystem (such as preparation of quota files) before we can take userspace writes so we are clearing SB_RDONLY flag before we are fully ready to accept userpace writes and syzbot has found a way to exploit this [1]. Also as far as I'm reading the code the filesystem remount code was protected from racing writes in the legacy mount path by the mount's MNT_READONLY flag so this is relatively new problem. It is actually fairly easy to protect remount read-write from racing writes using sb->s_readonly_remount flag so let's just do that instead of having to workaround these races in the filesystem code. [1] https://lore.kernel.org/all/00000000000006a0df05f6667499@google.com/T/
Product status
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (git) before 0336b42456e485fda1006b5b411e7372e20fbf03
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (git) before 7e4e87ec56aa6d008c64eab31b340a7c452b26cc
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (git) before 0ccfe21949bc9f706a86ee7351b74375c0745757
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (git) before 295ef44a2abaf97d7a594b1d4c60d4be3738191f
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (git) before 4abda85197ba5d695e6040d580b4b409ce0d3733
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (git) before c541dce86c537714b6761a79a969c1623dfa222b
5.4.253 (semver)
5.10.190 (semver)
5.15.126 (semver)
6.1.45 (semver)
6.4.10 (semver)
6.5 (original_commit_for_fix)
References
git.kernel.org/...c/0336b42456e485fda1006b5b411e7372e20fbf03
git.kernel.org/...c/7e4e87ec56aa6d008c64eab31b340a7c452b26cc
git.kernel.org/...c/0ccfe21949bc9f706a86ee7351b74375c0745757
git.kernel.org/...c/295ef44a2abaf97d7a594b1d4c60d4be3738191f
git.kernel.org/...c/4abda85197ba5d695e6040d580b4b409ce0d3733
git.kernel.org/...c/c541dce86c537714b6761a79a969c1623dfa222b
Data based on CVE®. Copyright © 1999-2025, The MITRE Corporation. All rights reserved.