CVE-2026-143176

Not scored yetLast modified Dec 3, 2026

Description

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

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

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

errseq_set() only bumps the counter when ERRSEQ_SEEN 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) check_and_advance(&f) old = [c, EIO] set(-ENOSPC) -> [c, ENOSPC] cmpxchg() fails f = [c, EIO, SEEN] returns -EIO set(-EIO) -> [c, EIO] (no bump: unseen) check_and_advance(&g) -> [c, EIO, SEEN] returns -EIO check_and_advance(&f) [c, EIO, SEEN] == f returns 0 <- -ENOSPC and the second -EIO are lost

For file->f_wb_err 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->s_wb_err, 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 ERRSEQ_SEEN set. Every later errseq_set() 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 errseq_set().

A TLA+ model of errseq_set() and errseq_check_and_advance(), 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.

Metrics

No CVSS score has been published yet.

Affected software

Source: the vendor's advisory (CNA). NVD analysis pending.

No affected versions have been published.

Timeline

Published
Dec 3, 2026
Last modified
Dec 3, 2026
NVD status
Received

Related CVEs from 2026

CVE-2026-143177In the Linux kernel, the following vulnerability has been resolved: memstick: core: don't clear dev->driver in memstick_device_remove() meCVE-2026-143178In the Linux kernel, the following vulnerability has been resolved: mmc: meson-gx: report busy from DAT0 alone meson_mmc_card_busy() reporCVE-2026-143179In the Linux kernel, the following vulnerability has been resolved: mmc: omap: synchronize clock timer before disabling fclk mmc_omap_seleCVE-2026-143186.8The GiveWP WordPress plugin before 4.16.3 does not escape a donation-form template setting before outputting it in an HTML attribute, allowCVE-2026-143180In the Linux kernel, the following vulnerability has been resolved: ALSA: usb-audio: Drop capture packets with bogus actual_length retire_CVE-2026-143181In the Linux kernel, the following vulnerability has been resolved: ALSA: caiaq: Kill EP1 URB before unregistering the input device snd_diCVE-2026-143182In the Linux kernel, the following vulnerability has been resolved: KEYS: Verify the key identity in __key_unlink_begin When two keys haveCVE-2026-143183In the Linux kernel, the following vulnerability has been resolved: KEYS: Reject descriptions larger than KEY_MAX_DESC_SIZE KEY_MAX_DESC_SCVE-2026-143184In the Linux kernel, the following vulnerability has been resolved: tracing/eprobe: Install the trigger for every instance that enables theCVE-2026-143185In the Linux kernel, the following vulnerability has been resolved: Xen/gnttab: improve error handling in gnttab_dma_{alloc,free}_pages() CVE-2026-143186In the Linux kernel, the following vulnerability has been resolved: nsh: limit recursion in nsh_gso_segment() nsh_gso_segment() calls skb_CVE-2026-143187In the Linux kernel, the following vulnerability has been resolved: tls: Consume empty data records in tls_sw_splice_read() A zero-length
CVE-2026-143176: Unscored | Vulnix