CVE-2026-142842: ext4: fix fast commit replay failing on a read-only mount

Published Dec 3, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

ext4: fix fast commit replay failing on a read-only mount

A filesystem with fastcommit that needs recovery cannot be mounted read-only:

EXT4-fs (dm-0): INFO: recovery required on readonly filesystem EXT4-fs (dm-0): write access will be enabled during recovery WARNING: CPU: 22 PID: 5544 at fs/ext4/ext4jbd2.c:73 ext4journalcheckstart ext4journalstartsb ext4unlink ext4fcreplay doonepass jbd2journalrecover jbd2journalload ext4fillsuper JBD2: journal recovery failed EXT4-fs (dm-0): error loading journal

Fast commit replay runs ext4 metadata operations instead of writing blocks through the buffer cache: ext4fcreplay{unlink,link,create}() reach ext4unlink() and ext4link(), which start a handle. ext4journalcheckstart() returns -EROFS on a read-only sb, and as that is not -ENOENT it propagates out of jbd2journalrecover() and kills the whole recovery. The EXT4FCREPLAY check that would hand out a no-journal handle sits after the sbrdonly() test, so replay can never complete read-only.

ext4loadjournal() has already promised that write access will be enabled during recovery, so make that true for the superblock as well: clear SBRDONLY across jbd2journalload() when recovery is needed on a read-only mount and the devices are writable, as ext4orphancleanup() does. Unlike ext4handleerror(), which avoids SBRDONLY because it would need sumount, the sb here is still inside ext4fillsuper() and not published, so nothing can observe it.

The failure is not clean either: the replay handlers passing a NULL handle (ext4fcreplayinode(), addrange(), delrange()) never hit ext4journalcheckstart() and do write, leaving a partially applied fast commit behind.

Reproducer, where the unlink only ever reaches the fast commit area:

mke2fs -q -F -t ext4 -O fastcommit -b 4096 /dev/sdb3 262144 mount /dev/sdb3 /mnt dd if=/dev/zero of=/mnt/victim bs=4k count=1 conv=fsync sync # victim now in a full commit rm /mnt/victim dd if=/dev/zero of=/mnt/trigger bs=4k count=1 conv=fsync <crash, or snapshot the device while mounted and write it back> mount -o ro /dev/sdb3 /mnt

Without this patch that mount fails; with it recovery completes and victim is gone, i.e. the UNLINK record was really replayed.

Affected Software

1 affected component
Linux Linux kernel

Event History

Dec 3, 2026
CVE Published
via MITRE·03:20 AM
Data Sourced
via MITRE·03:20 AM
Description

Frequently Asked Questions

1

Which systems are affected by this failure?

The issue affects ext4 filesystems using fast commits when journal recovery is required and the filesystem is mounted read-only. A read-only ext4 mount that does not require recovery is not described as affected.

2

How can I tell whether this condition is occurring?

The kernel log can report “recovery required on readonly filesystem,” followed by “write access will be enabled during recovery.” Failed recovery may also produce a warning from ext4_journal_check_start, “JBD2: journal recovery failed,” and “error loading journal.”},{

3

What is required for recovery to complete on an affected read-only mount?

Recovery needs write access to be enabled during the recovery process. The failure occurs because fast-commit replay attempts metadata operations while the superblock is treated as read-only.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203