KernelScan.io

HIGH Introduced in 6.10

xfs Tempfile UAF

CVE-2026-80531

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 AI6.1MEDIUM

01

In the Linux kernel, the following vulnerability has been resolved: xfs: avoid UAF on sc->tempip in xrep_tempfile_create LOLLM noticed a potential UAF if the tempfile creation code fails after it set sc->tempip. Fix that.

02

Engine v0.6.0

Risk summary

A use-after-free vulnerability exists in the XFS online filesystem repair (scrub) subsystem when creating temporary files for metadata reconstruction. If the tempfile creation fails after assigning a pointer to a newly allocated inode but before completing setup, the error path frees the inode without clearing the pointer, leaving a dangling reference that can cause a kernel crash or memory corruption. This issue requires CAP_SYS_ADMIN privileges to trigger via repair operations.

Affectedfs/xfs/scrub/tempfile.c (xfs online repair)

Vulnerability analysis

In the XFS online repair subsystem, the code that creates temporary files for staging reconstructed metadata assigns a pointer to a newly allocated inode early in the process. If a subsequent step in the creation fails, the error handling path correctly unlocks and releases the inode, but it fails to clear the pointer. This leaves a dangling reference that can be accessed later, resulting in a use-after-free condition. The fix adds a single line to nullify the pointer immediately after the inode is released in the error path, preventing any subsequent stale access. This code path is only reachable by a privileged local process holding CAP_SYS_ADMIN that initiates an XFS online repair operation.

03

BranchIntroducedFixed inPatch commit
6.126.106.12.10508a20776ce33
6.186.106.18.46cd1f876d1bc2
7.16.107.1.1096246a3200d3
mainline6.107.20c88e10d12de
cip/6.126.106.12.108-cip3108a20776ce33

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.108-cip31