CVE-2023-54099 in Linuxinfo

Summary

by MITRE • 12/24/2025

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/[email protected]/T/

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 01/03/2026

The vulnerability described in CVE-2023-54099 represents a critical race condition in the Linux kernel's filesystem reconfiguration mechanism, specifically affecting the transition from read-only to read-write mount states. This issue occurs within the superblock management code where the kernel attempts to protect filesystem reconfiguration operations from concurrent write operations during remounting processes. The fundamental problem arises when a filesystem is being remounted from read-only to read-write mode, as the kernel clears the SB_RDONLY flag prematurely, allowing userspace write operations to commence before the underlying filesystem is fully prepared to handle such operations. This timing gap creates an exploitable condition that can lead to data corruption and system instability.

The technical flaw stems from the improper synchronization between the kernel's superblock flag management and the actual readiness of filesystem components to accept user writes. During the remount process, the kernel's reconfigure code properly protects against racing writes when transitioning from read-write to read-only mode, but fails to maintain similar protections when moving in the reverse direction. The filesystem code, particularly in ext4 implementations, requires specific preparatory writes such as quota file initialization before it can safely accept user-space write operations. However, the SB_RDONLY flag is cleared before these preparatory operations complete, creating a window where concurrent writes can interfere with the filesystem's internal state management. This race condition was not present in the legacy mount path because the MNT_READONLY flag provided adequate protection, making this a regression in the kernel's synchronization mechanisms.

The operational impact of this vulnerability extends beyond simple data corruption to potentially compromise system integrity and availability. Attackers can exploit this race condition through carefully crafted concurrent write operations that occur during the brief window when SB_RDONLY flag is cleared but filesystem preparation is still in progress. The syzbot automated testing system has demonstrated that this vulnerability can be reliably triggered, indicating that it represents a real security risk rather than a theoretical concern. When exploited, this vulnerability can lead to filesystem inconsistencies, data loss, and potentially allow privilege escalation attacks that leverage the filesystem's inconsistent state. The vulnerability affects all filesystem implementations that rely on the standard kernel remount mechanisms, making it particularly concerning for production systems where concurrent filesystem operations are common.

Mitigation strategies for this vulnerability require kernel-level patches that implement proper protection mechanisms using the s_readonly_remount flag as suggested in the fix. The recommended approach involves modifying the remount code to prevent userspace writes from commencing until the filesystem has completed all necessary preparation steps, even when the SB_RDONLY flag has been cleared. This protection mechanism should be implemented consistently across all filesystem types that support remount operations, ensuring that the s_readonly_remount flag serves as the primary synchronization primitive for preventing racing writes during read-write transitions. System administrators should prioritize applying the kernel patches that address this specific race condition, as the vulnerability affects core filesystem functionality and can lead to serious operational disruptions. Additionally, monitoring for concurrent filesystem operations during remount events and implementing proper logging of filesystem state transitions can help detect exploitation attempts and provide forensic evidence for incident response activities. This vulnerability aligns with CWE-362, which describes race conditions in concurrent programming, and represents a specific instance of improper synchronization that can be addressed through proper kernel-level locking mechanisms and flag management protocols.

Responsible

Linux

Reservation

12/24/2025

Disclosure

12/24/2025

Moderation

accepted

CPE

ready

EPSS

0.00180

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!