CVE-2026-139274
published high CVSS 3.1 · 7.0nfs/localio: pin UUIDs during global invalidation
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux085804110aa13eac7f763d8d5cfe3a8220e35222 to < 30c3fc2bb5019783c88ffc21666b8e54f862ea9e · 085804110aa13eac7f763d8d5cfe3a8220e35222 to < c50f364a2a534d00f72b997c58aa153c9ae70a60 · 085804110aa13eac7f763d8d5cfe3a8220e35222 to < 62e14699c4dfc98c514a44bf780678cf8622fc08 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.14 (affected) · 0 to < 6.14 (unaffected · semver) · 6.18.65 through 6.18.* (unaffected · semver) · 7.3.6 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
Description
In the Linux kernel, the following vulnerability has been resolved: nfs/localio: pin UUIDs during global invalidation nfs_localio_invalidate_clients() moves UUID nodes embedded in nfs_client objects to a private list, then walks that list without retaining the containing clients. Concurrent client teardown can free an entry that the iterator has already selected, causing a use-after-free. Take a reference to each selected UUID under the namespace list lock. Keep this reference count in nfs_common, independently of cl_count, and have nfs_free_client() drain temporary UUID users before freeing the client. Releasing a UUID reference wakes waiting probes and signals completion when the last reference is dropped. It neither calls into nfs.ko nor performs final NFS client teardown in the NFSD invalidation context. Keep the UUID on the namespace list until its files have been closed. When another thread is already disabling it, wait for that thread to finish unlinking it instead of repeatedly selecting the same head entry. The wait releases the UUID spinlock so file cleanup can make progress. Append registrations in sequence order and capture the last sequence under the namespace list lock at the start of invalidation. Stop at that boundary so new registrations cannot indefinitely extend the sweep, even if its original last entry is removed concurrently. Publish the LOCALIO association under the UUID and namespace list locks before making the entry visible to invalidation. A temporary UUID reference allows the handshake to drop the global lookup lock before taking the UUID lock in the documented order; recheck the lookup in case the probe was withdrawn. A new probe waits for temporary UUID users to drain, then rechecks the association before reusing the UUID. This keeps a transient invalidation reference from discarding the client's LOCALIO revalidation attempt. Withdraw pending probes before dropping the owner's UUID reference. A deterministic same-base KASAN reproducer triggered the reported use-after-free on the unpatched tree. With this patch, the same controlled invalidation and teardown race completed without the target KASAN report or another selected kernel diagnostic. A separate all-live run recorded disable events for all 16 unique clients. Test-only synchronization hooks verified that a second disabler waits for unlink after ->net is cleared and that client teardown waits for a temporary UUID reference to drain. NFSv4.2 and NFSv3 read, write, and unmount smoke tests, export-flush and I/O stress, NFSD restarts, network namespace lifecycle tests, and module unloads passed with KASAN and lockdep enabled. A full x86_64 kernel and modules build with GCC 13.3, CONFIG_WERROR=y, NFS_FS=m, NFSD=m, and LOCALIO enabled completed without diagnostics. Module metadata showed that nfs_localio.ko depends only on sunrpc, while nfs.ko depends on lockd, nfs_localio, and sunrpc. A separate NFS_FS=m, NFSD=y build also linked vmlinux successfully. The vulnerability research and validation were conducted by members of the Tobabz team as part of the Best of the Best 15th program.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.0 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - Local: the attacker writes to /proc/<pid>/net/rpc/nfsd.fh/flush, which runs write_flush -> expkey_flush -> nfsd_file_cache_purge -> __nfsd_file_cache_purge -> nfs_localio_invalidate_clients. LOCALIO clients sit on the same host as nfsd, and the sweep parses no wire data. The UUID_IS_LOCAL RPC only registers entries. AC:H - High: the attacker can run the unpinned sweep at will and widen it by holding many LOCALIO files open on an earlier nn->local_clients entry, since nfs_uuid_put closes each one with cond_resched. But a later entry's nfs_client must also reach nfs_free_client -> kfree_rcu inside that window. That needs a umount, autofs expiry or container teardown the attacker cannot trigger, and NFS_LOCALIO defaults to n. PR:L - Low: expkey_flush() purges current->nsproxy->net_ns, not the cache's netns. After unshare -Urn, the per-netns nfsd.fh/flush file (registered in nfsd_net_init) inherits the user's uid via proc_net_ns_init and __proc_create's proc_set_user. A same-uid process still in init_net opens /proc/<child>/net/rpc/nfsd.fh/flush, and open_flush has no capability check. UI:N - None: no victim action on attacker-supplied content is needed. The attacker drives the invalidation sweep itself. The client teardown that frees the entry is a routine admin or automount event and is counted under AC:H, not as user interaction. S:U - Unchanged: the freed nfs_client and the walker in nfs_localio_invalidate_clients are both in the same kernel, so the corruption stays within one security authority. No guest/host or IOMMU boundary is crossed. C:H - High: the walker dereferences a stale nfs_uuid_t embedded in a kfree_rcu'd nfs_client from a kmalloc slab. A reclaimed object controls ->list_lock, ->net, ->dom and the ->files list that nfs_uuid_put walks, so kernel reads can be steered through forged pointers. I:H - High: on reclaimed memory, nfs_uuid_put clears ->net and runs spin_lock and list_del_init through forged pointers. It also passes forged nfsd_file pointers to nfs_to_nfsd_file_put_local and calls auth_domain_put(dom), whose kref_put reaches dom->flavour->domain_release, an indirect call through attacker data. A:H - High: even without reclaim, teardown leaves the stale entry's ->list_lock NULL, so the sweep trips its WARN_ON on freed memory (fatal with panic_on_warn). Once the slab is reused, the forged lock, list and kref operations crash the kernel or corrupt nfsd and NFS client state.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 085804110aa13eac7f763d8d5cfe3a8220e35222 to < 30c3fc2bb5019783c88ffc21666b8e54f862ea9e (affected · git)085804110aa13eac7f763d8d5cfe3a8220e35222 to < c50f364a2a534d00f72b997c58aa153c9ae70a60 (affected · git)085804110aa13eac7f763d8d5cfe3a8220e35222 to < 62e14699c4dfc98c514a44bf780678cf8622fc08 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 6.14 (affected)0 to < 6.14 (unaffected · semver)6.18.65 through 6.18.* (unaffected · semver)7.3.6 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
3Provider assertions
1Linux · cna
nfs/localio: pin UUIDs during global invalidation
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 9ee59d6d038bab7f1e8123dcdc7339d821eafeb1a3cc0949efdd4b0416ee1d54
- Ingested
- 01 Dec 2026, 05:47:22 UTC
- Source record
- Official CVE record