CVE-2024-50191: ext4: don't set SB_RDONLY after filesystem errors
In the Linux kernel, the following vulnerability has been resolved:
ext4: don't set SBRDONLY after filesystem errors
When the filesystem is mounted with errors=remount-ro, we were setting SBRDONLY flag to stop all filesystem modifications. We knew this misses proper locking (sb->sumount) 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 SBRDONLY changing under its hands. Since these days we set EXT4FLAGSSHUTDOWN on the superblock which is enough to stop all filesystem modifications, modifying SBRDONLY shouldn't be needed. So stop doing that.
Other sources
In the Linux kernel, the following vulnerability has been resolved:
ext4: don't set SBRDONLY after filesystem errors
When the filesystem is mounted with errors=remount-ro, we were setting SBRDONLY flag to stop all filesystem modifications. We knew this misses proper locking (sb->sumount) 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 SBRDONLY changing under its hands. Since these days we set EXT4FLAGSSHUTDOWN on the superblock which is enough to stop all filesystem modifications, modifying SBRDONLY shouldn't be needed. So stop doing that.
— NVD
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-50191?
CVE-2024-50191 has a severity rating that indicates potential impacts on filesystem modifications when errors occur.
How do I fix CVE-2024-50191?
To fix CVE-2024-50191, update your Linux kernel to version 6.1.123-1, 6.1.119-1, 6.12.10-1, or 6.12.11-1.
Which versions of the Linux kernel are affected by CVE-2024-50191?
CVE-2024-50191 affects various versions of the Linux kernel up to 5.15.168 and between 5.16 and 6.1.113.
What is the nature of CVE-2024-50191?
CVE-2024-50191 involves improper handling of the SB_RDONLY flag after filesystem errors in the ext4 filesystem.
Is there a recommended remedial action for CVE-2024-50191?
The recommended action for CVE-2024-50191 is to apply patches or upgrade to the secure versions of the Linux kernel.