{"id":"CVE-2026-139274","state":"PUBLISHED","title":"nfs/localio: pin UUIDs during global invalidation","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnfs/localio: pin UUIDs during global invalidation\n\nnfs_localio_invalidate_clients() moves UUID nodes embedded in nfs_client\nobjects to a private list, then walks that list without retaining the\ncontaining clients. Concurrent client teardown can free an entry that\nthe iterator has already selected, causing a use-after-free.\n\nTake a reference to each selected UUID under the namespace list lock.\nKeep this reference count in nfs_common, independently of cl_count, and\nhave nfs_free_client() drain temporary UUID users before freeing the\nclient. Releasing a UUID reference wakes waiting probes and signals\ncompletion when the last reference is dropped. It neither calls into\nnfs.ko nor performs final NFS client teardown in the NFSD invalidation\ncontext.\n\nKeep the UUID on the namespace list until its files have been closed.\nWhen another thread is already disabling it, wait for that thread to\nfinish unlinking it instead of repeatedly selecting the same head entry.\nThe wait releases the UUID spinlock so file cleanup can make progress.\n\nAppend registrations in sequence order and capture the last sequence\nunder the namespace list lock at the start of invalidation. Stop at that\nboundary so new registrations cannot indefinitely extend the sweep,\neven if its original last entry is removed concurrently.\n\nPublish the LOCALIO association under the UUID and namespace list locks\nbefore making the entry visible to invalidation. A temporary UUID\nreference allows the handshake to drop the global lookup lock before\ntaking the UUID lock in the documented order; recheck the lookup in case\nthe probe was withdrawn. A new probe waits for temporary UUID users to\ndrain, then rechecks the association before reusing the UUID. This keeps\na transient invalidation reference from discarding the client's LOCALIO\nrevalidation attempt. Withdraw pending probes before dropping the owner's\nUUID reference.\n\nA deterministic same-base KASAN reproducer triggered the reported\nuse-after-free on the unpatched tree. With this patch, the same controlled\ninvalidation and teardown race completed without the target KASAN report\nor another selected kernel diagnostic. A separate all-live run recorded\ndisable events for all 16 unique clients.\n\nTest-only synchronization hooks verified that a second disabler waits for\nunlink after ->net is cleared and that client teardown waits for a\ntemporary UUID reference to drain. NFSv4.2 and NFSv3 read, write, and\nunmount smoke tests, export-flush and I/O stress, NFSD restarts, network\nnamespace lifecycle tests, and module unloads passed with KASAN and\nlockdep enabled.\n\nA full x86_64 kernel and modules build with GCC 13.3, CONFIG_WERROR=y,\nNFS_FS=m, NFSD=m, and LOCALIO enabled completed without diagnostics.\nModule metadata showed that nfs_localio.ko depends only on sunrpc, while\nnfs.ko depends on lockd, nfs_localio, and sunrpc.\n\nA separate NFS_FS=m, NFSD=y build also linked vmlinux successfully.\n\nThe vulnerability research and validation were conducted by members of\nthe Tobabz team as part of the Best of the Best 15th program.","publishedAt":"2026-11-30T13:33:14.332Z","updatedAt":"2026-11-30T13:33:14.332Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"085804110aa13eac7f763d8d5cfe3a8220e35222","status":"affected","lessThan":"30c3fc2bb5019783c88ffc21666b8e54f862ea9e","versionType":"git"},{"version":"085804110aa13eac7f763d8d5cfe3a8220e35222","status":"affected","lessThan":"c50f364a2a534d00f72b997c58aa153c9ae70a60","versionType":"git"},{"version":"085804110aa13eac7f763d8d5cfe3a8220e35222","status":"affected","lessThan":"62e14699c4dfc98c514a44bf780678cf8622fc08","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/nfs/client.c","fs/nfs_common/nfslocalio.c","include/linux/nfslocalio.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.14","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/nfs/client.c","fs/nfs_common/nfslocalio.c","include/linux/nfslocalio.h"]}],"references":["https://git.kernel.org/stable/c/30c3fc2bb5019783c88ffc21666b8e54f862ea9e","https://git.kernel.org/stable/c/c50f364a2a534d00f72b997c58aa153c9ae70a60","https://git.kernel.org/stable/c/62e14699c4dfc98c514a44bf780678cf8622fc08"],"weaknesses":[],"ingestedAt":"2026-11-30T13:46:04.484Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139274.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139274","state":"PUBLISHED","datePublished":"2026-11-30T13:33:14.332Z","dateUpdated":"2026-11-30T13:33:14.332Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.924Z"},"containers":{"cna":{"title":"nfs/localio: pin UUIDs during global invalidation","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnfs/localio: pin UUIDs during global invalidation\n\nnfs_localio_invalidate_clients() moves UUID nodes embedded in nfs_client\nobjects to a private list, then walks that list without retaining the\ncontaining clients. Concurrent client teardown can free an entry that\nthe iterator has already selected, causing a use-after-free.\n\nTake a reference to each selected UUID under the namespace list lock.\nKeep this reference count in nfs_common, independently of cl_count, and\nhave nfs_free_client() drain temporary UUID users before freeing the\nclient. Releasing a UUID reference wakes waiting probes and signals\ncompletion when the last reference is dropped. It neither calls into\nnfs.ko nor performs final NFS client teardown in the NFSD invalidation\ncontext.\n\nKeep the UUID on the namespace list until its files have been closed.\nWhen another thread is already disabling it, wait for that thread to\nfinish unlinking it instead of repeatedly selecting the same head entry.\nThe wait releases the UUID spinlock so file cleanup can make progress.\n\nAppend registrations in sequence order and capture the last sequence\nunder the namespace list lock at the start of invalidation. Stop at that\nboundary so new registrations cannot indefinitely extend the sweep,\neven if its original last entry is removed concurrently.\n\nPublish the LOCALIO association under the UUID and namespace list locks\nbefore making the entry visible to invalidation. A temporary UUID\nreference allows the handshake to drop the global lookup lock before\ntaking the UUID lock in the documented order; recheck the lookup in case\nthe probe was withdrawn. A new probe waits for temporary UUID users to\ndrain, then rechecks the association before reusing the UUID. This keeps\na transient invalidation reference from discarding the client's LOCALIO\nrevalidation attempt. Withdraw pending probes before dropping the owner's\nUUID reference.\n\nA deterministic same-base KASAN reproducer triggered the reported\nuse-after-free on the unpatched tree. With this patch, the same controlled\ninvalidation and teardown race completed without the target KASAN report\nor another selected kernel diagnostic. A separate all-live run recorded\ndisable events for all 16 unique clients.\n\nTest-only synchronization hooks verified that a second disabler waits for\nunlink after ->net is cleared and that client teardown waits for a\ntemporary UUID reference to drain. NFSv4.2 and NFSv3 read, write, and\nunmount smoke tests, export-flush and I/O stress, NFSD restarts, network\nnamespace lifecycle tests, and module unloads passed with KASAN and\nlockdep enabled.\n\nA full x86_64 kernel and modules build with GCC 13.3, CONFIG_WERROR=y,\nNFS_FS=m, NFSD=m, and LOCALIO enabled completed without diagnostics.\nModule metadata showed that nfs_localio.ko depends only on sunrpc, while\nnfs.ko depends on lockd, nfs_localio, and sunrpc.\n\nA separate NFS_FS=m, NFSD=y build also linked vmlinux successfully.\n\nThe vulnerability research and validation were conducted by members of\nthe Tobabz team as part of the Best of the Best 15th program."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"085804110aa13eac7f763d8d5cfe3a8220e35222","status":"affected","lessThan":"30c3fc2bb5019783c88ffc21666b8e54f862ea9e","versionType":"git"},{"version":"085804110aa13eac7f763d8d5cfe3a8220e35222","status":"affected","lessThan":"c50f364a2a534d00f72b997c58aa153c9ae70a60","versionType":"git"},{"version":"085804110aa13eac7f763d8d5cfe3a8220e35222","status":"affected","lessThan":"62e14699c4dfc98c514a44bf780678cf8622fc08","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/nfs/client.c","fs/nfs_common/nfslocalio.c","include/linux/nfslocalio.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.14","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/nfs/client.c","fs/nfs_common/nfslocalio.c","include/linux/nfslocalio.h"]}],"references":[{"url":"https://git.kernel.org/stable/c/30c3fc2bb5019783c88ffc21666b8e54f862ea9e"},{"url":"https://git.kernel.org/stable/c/c50f364a2a534d00f72b997c58aa153c9ae70a60"},{"url":"https://git.kernel.org/stable/c/62e14699c4dfc98c514a44bf780678cf8622fc08"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:33:14.332Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.14","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.14","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.14","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}