KernelScan.io

HIGH

xfs Unmount Race

CVE-2026-31455

CVSS 7.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI5.9MEDIUM

01

In the Linux kernel, the following vulnerability has been resolved: xfs: stop reclaim before pushing AIL during unmount The unmount sequence in xfs_unmount_flush_inodes() pushed the AIL while background reclaim and inodegc are still running. This is broken independently of any use-after-free issues - background reclaim and inodegc should not be running while the AIL is being pushed during unmount, as inodegc can dirty and insert inodes into the AIL during the flush, and background reclaim can race to abort and free dirty inodes. Reorder xfs_unmount_flush_inodes() to stop inodegc and cancel background reclaim before pushing the AIL. Stop inodegc before cancelling m_reclaim_work because the inodegc worker can re-queue m_reclaim_work via xfs_inodegc_set_reclaimable.

02

Engine v0.2.0

Risk summary

A race condition in XFS filesystem unmount can lead to use-after-free conditions and filesystem corruption. Systems with XFS filesystems where root users perform unmount operations are at risk of kernel slab info leaks, filesystem data corruption, and kernel crashes.

Affectedfs/xfs/xfs_mount.c (XFS filesystem)

Vulnerability analysis

The vulnerability occurs in xfs_unmount_flush_inodes() where AIL (Active Item List) pushing begins before stopping background reclaim and inodegc workers. This creates a race where background reclaim can free dirty inodes while AIL is flushing them, resulting in use-after-free on heap objects, and inodegc can insert new dirty inodes during the flush. The fix reorders operations to stop all background workers before AIL pushing, eliminating the race window. Attack surface is local-only, requiring CAP_SYS_ADMIN or root privileges to trigger filesystem unmount operations.

03

BranchFixed inPatch commit
5.105.10.253e6cc490048f7
5.155.15.203239d734c0064
6.16.1.168bda27fc0b4eb
6.126.12.80a89434a6188d
6.186.18.218147e304d7d3
6.196.19.11558e3275d8a3
6.66.6.131d38135af04a3
mainline7.04f24a767e3d6