{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-63978","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-07-19T07:54:57.025Z","datePublished":"2026-07-19T14:56:02.484Z","dateUpdated":"2026-08-09T18:34:55.102Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-09T18:34:55.102Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/handshake: Drain pending requests at net namespace exit\n\nThe arguments to list_splice_init() in handshake_net_exit() are\nreversed. The call moves the local empty \"requests\" list onto\nhn->hn_requests, leaving the local list empty, so the subsequent\ndrain loop runs zero iterations. Pending handshake requests that\nhad not yet been accepted are not torn down when the net namespace\nis destroyed; each one keeps a reference on a socket file and on\nthe handshake_req allocation.\n\nPass the source and destination in the documented order\n(list_splice_init(list, head) moves list onto head) so the pending\nlist is transferred to the local scratch list and drained through\nhandshake_complete().\n\nFixing the splice direction exposes a list-corruption race. After\nthe splice each req->hr_list still has non-empty link pointers,\nthreading the stack-local scratch list rather than hn_requests.\nA concurrent handshake_req_cancel() -- for example, from sunrpc's\nTLS timeout on a kernel socket whose netns reference was not\ntaken -- finds the request through the rhashtable, calls\nremove_pending(), and sees !list_empty(&req->hr_list).\n__remove_pending_locked() then list_del_init()s an entry off the\nscratch list while the drain iterates, corrupting it. The same\ncall arriving after the drain loop has run list_del() on an\nentry hits LIST_POISON instead.\n\nHave remove_pending() check HANDSHAKE_F_NET_DRAINING under\nhn_lock and report not-found when drain is in progress. The\ndrain has already taken ownership; handshake_complete()'s existing\ntest_and_set on HANDSHAKE_F_REQ_COMPLETED still arbitrates\nbetween drain and cancel for who calls the consumer's hp_done. Use\nlist_del_init() rather than list_del() in the drain so req->hr_list\ndoes not carry LIST_POISON after drain releases the entry.\n\nThe DRAINING guard in remove_pending() makes cancel return false,\nbut cancel still falls through to test_and_set_bit on\nHANDSHAKE_F_REQ_COMPLETED and drops the request's hr_file reference.\nWithout another pin, if that is the last reference, sk_destruct frees\nthe request while it is still linked on the drain loop's local list.\nPin each request's hr_file under hn_lock before releasing the list,\nand drop that drain pin after the loop finishes with the request."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":9.8,"baseSeverity":"CRITICAL"},"scenarios":[{"lang":"en","value":"AV:N - Pending handshake requests are created by network-facing kernel TLS consumers (nfsd via `tls_server_hello_x509()` in sunrpc, nvmet-tcp via `tls_server_hello_psk()`), reachable from unauthenticated remote TCP connections before credentials are verified; the bug fires when that namespace is torn down while those requests remain pending.\nAC:L - An attacker can reliably orchestrate the failure by opening TLS connections to leave handshakes pending, then destroying the namespace (user/net namespace or container teardown) and waiting for the predictable sunrpc/NVMe TLS timeout to invoke `handshake_req_cancel()` against freed per-net state.\nPR:N - No server-side privileges are required to reach the vulnerable path—remote peers can initiate the pre-authentication TLS handshake that queues pending requests; namespace teardown is also achievable without init-namespace root via user namespaces granting CAP_SYS_ADMIN.\nUI:N - Exploitation requires no victim interaction beyond the attacker (or orchestrator) initiating connections and namespace lifecycle events; no end-user actions such as mounting filesystems or opening files are needed.\nS:U - Impact is confined to kernel memory corruption and host availability within the same kernel security domain; it does not cross a VM, container sandbox, or IOMMU boundary to affect a separate security authority.\nC:H - Undrained requests leave `handshake_req` objects and freed `handshake_net` state reachable through the global rhashtable; concurrent `handshake_req_cancel()` dereferences freed `hn_lock`/`hn_requests` and can hit LIST_POISON, constituting use-after-free with arbitrary-read potential.\nI:H - The reversed `list_splice_init()` and ensuing drain/cancel races corrupt kernel linked lists and free in-use `handshake_req` structures while still linked, enabling memory corruption exploitable for control-flow hijacking.\nA:H - List corruption and use-after-free on namespace exit or concurrent cancel reliably cause kernel oops/panic or deadlock-class failures, and repeated namespace churn with pending handshakes enables sustained denial of service on the host."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/handshake/netlink.c","net/handshake/request.c"],"versions":[{"version":"3b3009ea8abb713b022d94fba95ec270cf6e7eae","lessThan":"9ec20c9a5a04f2c3f1cf65d21f886d7aaa6189cd","status":"affected","versionType":"git"},{"version":"3b3009ea8abb713b022d94fba95ec270cf6e7eae","lessThan":"2bf24a7e190aae0ea47c78099938ae056c622e44","status":"affected","versionType":"git"},{"version":"3b3009ea8abb713b022d94fba95ec270cf6e7eae","lessThan":"8c35539db0ab0bfa1ea44efab00b053261a69469","status":"affected","versionType":"git"},{"version":"3b3009ea8abb713b022d94fba95ec270cf6e7eae","lessThan":"ea5fe6a73ca57e5150b8a38b341aef2636eb72f0","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/handshake/netlink.c","net/handshake/request.c"],"versions":[{"version":"6.4","status":"affected"},{"version":"0","lessThan":"6.4","status":"unaffected","versionType":"semver"},{"version":"6.12.93","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.18.44","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.0.12","lessThanOrEqual":"7.0.*","status":"unaffected","versionType":"semver"},{"version":"7.1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"6.12.93"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"6.18.44"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"7.0.12"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"7.1"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/9ec20c9a5a04f2c3f1cf65d21f886d7aaa6189cd"},{"url":"https://git.kernel.org/stable/c/2bf24a7e190aae0ea47c78099938ae056c622e44"},{"url":"https://git.kernel.org/stable/c/8c35539db0ab0bfa1ea44efab00b053261a69469"},{"url":"https://git.kernel.org/stable/c/ea5fe6a73ca57e5150b8a38b341aef2636eb72f0"}],"title":"net/handshake: Drain pending requests at net namespace exit","x_generator":{"engine":"bippy-1.2.0"}}}}