CVE-2026-143176: errseq: don't let errseq_check_and_advance() hide later errors

Published Dec 3, 2026
·
Updated

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

errseq: don't let errseqcheckandadvance() hide later errors

errseqcheckandadvance() reads the errseqt, sets ERRSEQSEEN with a cmpxchg() and then advances since to the value it computed, ignoring whether the cmpxchg() succeeded. When it fails because errseqset() recorded a different error in the meantime, since ends up holding a value that was never stored in the errseqt.

errseqset() only bumps the counter when ERRSEQSEEN is set. So as long as nobody has seen the new error, recording the original errno again recreates exactly the old value, and once another subscriber marks it seen, it is equal to the stale since. The next check through that cursor then reports nothing, although -ENOSPC was recorded after the value that check reported, and -EIO was recorded again after it returned:

cursor f writeback cursor g -------- --------- -------- set(-EIO) checkandadvance(&f) old = [c, EIO] set(-ENOSPC) -> [c, ENOSPC] cmpxchg() fails f = [c, EIO, SEEN] returns -EIO set(-EIO) -> [c, EIO] (no bump: unseen) checkandadvance(&g) -> [c, EIO, SEEN] returns -EIO checkandadvance(&f) [c, EIO, SEEN] == f returns 0 <- -ENOSPC and the second -EIO are lost

For file->fwberr this means that fsync() on one descriptor can return 0 although writeback failed after the previous fsync() on that descriptor returned, when writeback errors race with fsync() on another descriptor of the same file. The same applies to syncfs() through sb->swberr, which every file on the filesystem shares, and to the ext4 and jbd2 cursors on the block device mapping. The kernel-doc promises "Negative errno if one has been stored, or 0 if no new error has occurred".

Retry with the value found when the cmpxchg() fails, so that since is only ever advanced to a value that was actually stored with ERRSEQSEEN set. Every later errseqset() then has to bump the counter, and the error is reported. The retry loop terminates because each iteration needs a concurrent update, like the loop in errseqset().

A TLA+ model of errseqset() and errseqcheckandadvance(), checked with the TLC model checker, finds the lost error with the current code; with this change TLC checks that an error recorded after a check returned is always reported by the next check (exhaustively for two subscribers with three checks each, and one writer recording four errors or two writers recording two each). The KUnit race test added in the next patch misses the error in 1-6% of 2 million rounds on 4-CPU UML before this change (depending on host load), and in none after it.

Affected Software

3 affected componentsFixes available
Linux Linux kernel
linux/kernel>=4.13.0<6.18.66
6.18.66
linux/kernel>=6.19.0<7.3.7
7.3.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.66
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.7

Event History

Dec 3, 2026
CVE Published
via MITRE·09:20 AM
Data Sourced
via MITRE·09:20 AM
Description
Data Sourced
via OSV·09:20 AM
DescriptionAffected Software
Data Sourced
via NVD·10:17 AM
Description

Frequently Asked Questions

1

What runtime sequence can cause an error to be missed?

A call to errseq_check_and_advance() must race with errseq_set() such that its cmpxchg() fails, leaving its cursor updated to a value that was not stored in the errseq_t. If the original errno is later recorded again while unseen and another subscriber marks it seen, the stale cursor can match the current value and a subsequent check reports no error.

2

What is the practical effect of the stale cursor state?

A subscriber can receive no error indication even though later errors were recorded after its previous check. The described sequence causes a cursor to miss a later -ENOSPC event and a subsequent -EIO event.

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