Skip to contentSkip to conversation

CVE-2026-31453: xfs: avoid dereferencing log items after push callbacks

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Apr 22

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

xfs: avoid dereferencing log items after push callbacks

After xfsaild_push_item() calls iop_push(), the log item may have been freed if the AIL lock was dropped during the push. Background inode reclaim or the dquot shrinker can free the log item while the AIL lock is not held, and the tracepoints in the switch statement dereference the log item after iop_push() returns.

Fix this by capturing the log item type, flags, and LSN before calling xfsaild_push_item(), and introducing a new xfs_ail_push_class trace event class that takes these pre-captured values and the ailp pointer instead of the log item pointer.

The Linux kernel CVE team has assigned CVE-2026-31453 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.9 with commit 90c60e16401248a4900f3f9387f563d0178dcf34 and fixed in 6.1.168 with commit c8a2ab339b88d10fc34a3318c92f07d8a467019d
	Issue introduced in 5.9 with commit 90c60e16401248a4900f3f9387f563d0178dcf34 and fixed in 6.6.131 with commit 7121b22b0bac89394cc4c6a54b5aebc15347bdf5
	Issue introduced in 5.9 with commit 90c60e16401248a4900f3f9387f563d0178dcf34 and fixed in 6.12.80 with commit c4d603e8e58a3bf35480135ccca2b4f7238abda5
	Issue introduced in 5.9 with commit 90c60e16401248a4900f3f9387f563d0178dcf34 and fixed in 6.18.21 with commit 95fb5d643cc70959baa54cd17f52f80ffc3295e7
	Issue introduced in 5.9 with commit 90c60e16401248a4900f3f9387f563d0178dcf34 and fixed in 6.19.11 with commit 451c6329d9afa45862c36fe6677eb7750db60617
	Issue introduced in 5.9 with commit 90c60e16401248a4900f3f9387f563d0178dcf34 and fixed in 7.0 with commit 79ef34ec0554ec04bdbafafbc9836423734e1bd6

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-31453

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
fs/xfs/xfs_trace.h
fs/xfs/xfs_trans_ail.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/c8a2ab339b88d10fc34a3318c92f07d8a467019d
	https://git.kernel.org/stable/c/7121b22b0bac89394cc4c6a54b5aebc15347bdf5
	https://git.kernel.org/stable/c/c4d603e8e58a3bf35480135ccca2b4f7238abda5
	https://git.kernel.org/stable/c/95fb5d643cc70959baa54cd17f52f80ffc3295e7
	https://git.kernel.org/stable/c/451c6329d9afa45862c36fe6677eb7750db60617
	https://git.kernel.org/stable/c/79ef34ec0554ec04bdbafafbc9836423734e1bd6