# CVE-2026-63978: net/handshake: Drain pending requests at net namespace exit

- Severity: Critical 9.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.49%, higher than 43% of CVEs (2026-12-01)
- Published: 2026-07-19T14:56:02.484Z
- Modified: 2026-11-12T16:29:06.300Z
- Weaknesses: CWE-362
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

net/handshake: Drain pending requests at net namespace exit

The arguments to list_splice_init() in handshake_net_exit() are
reversed. The call moves the local empty "requests" list onto
hn->hn_requests, leaving the local list empty, so the subsequent
drain loop runs zero iterations. Pending handshake requests that
had not yet been accepted are not torn down when the net namespace
is destroyed; each one keeps a reference on a socket file and on
the handshake_req allocation.

Pass the source and destination in the documented order
(list_splice_init(list, head) moves list onto head) so the pending
list is transferred to the local scratch list and drained through
handshake_complete().

Fixing the splice direction exposes a list-corruption race. After
the splice each req->hr_list still has non-empty link pointers,
threading the stack-local scratch list rather than hn_requests.
A concurrent handshake_req_cancel() -- for example, from sunrpc's
TLS timeout on a kernel socket whose netns reference was not
taken -- finds the request through the rhashtable, calls
remove_pending(), and sees !list_empty(&req->hr_list).
__remove_pending_locked() then list_del_init()s an entry off the
scratch list while the drain iterates, corrupting it. The same
call arriving after the drain loop has run list_del() on an
entry hits LIST_POISON instead.

Have remove_pending() check HANDSHAKE_F_NET_DRAINING under
hn_lock and report not-found when drain is in progress. The
drain has already taken ownership; handshake_complete()'s existing
test_and_set on HANDSHAKE_F_REQ_COMPLETED still arbitrates
between drain and cancel for who calls the consumer's hp_done. Use
list_del_init() rather than list_del() in the drain so req->hr_list
does not carry LIST_POISON after drain releases the entry.

The DRAINING guard in remove_pending() makes cancel return false,
but cancel still falls through to test_and_set_bit on
HANDSHAKE_F_REQ_COMPLETED and drops the request's hr_file reference.
Without another pin, if that is the last reference, sk_destruct frees
the request while it is still linked on the drain loop's local list.
Pin each request's hr_file under hn_lock before releasing the list,
and drop that drain pin after the loop finishes with the request.

(As written by CVE List.)

## Affected

- Linux Linux: from 3b3009ea8abb713b022d94fba95ec270cf6e7eae before ee4b2ba9d30155f9945811cd3c0c1b06d45787a9; from 3b3009ea8abb713b022d94fba95ec270cf6e7eae before 9ec20c9a5a04f2c3f1cf65d21f886d7aaa6189cd; from 3b3009ea8abb713b022d94fba95ec270cf6e7eae before 2bf24a7e190aae0ea47c78099938ae056c622e44; from 3b3009ea8abb713b022d94fba95ec270cf6e7eae before 8c35539db0ab0bfa1ea44efab00b053261a69469; from 3b3009ea8abb713b022d94fba95ec270cf6e7eae before ea5fe6a73ca57e5150b8a38b341aef2636eb72f0; 6.4 (not affected: before 6.4; from 6.6.160 up to 6.6.*; from 6.12.93 up to 6.12.*; from 6.18.44 up to 6.18.*; from 7.0.12 up to 7.0.*; from 7.1 up to *)
- linux linux_kernel: from 6.4 before 6.6.160; from 6.7 before 6.12.93; from 6.13 before 6.18.44; from 6.19 before 7.0.12; 7.1

## References

- <https://git.kernel.org/stable/c/ee4b2ba9d30155f9945811cd3c0c1b06d45787a9> (patch)
- <https://git.kernel.org/stable/c/9ec20c9a5a04f2c3f1cf65d21f886d7aaa6189cd> (patch)
- <https://git.kernel.org/stable/c/2bf24a7e190aae0ea47c78099938ae056c622e44> (patch)
- <https://git.kernel.org/stable/c/8c35539db0ab0bfa1ea44efab00b053261a69469> (patch)
- <https://git.kernel.org/stable/c/ea5fe6a73ca57e5150b8a38b341aef2636eb72f0> (patch)

## Sources

- CVE List: [CVE-2026-63978](https://www.cve.org/CVERecord?id=CVE-2026-63978), CVE Terms of Use, modified 2026-10-21
- NVD: [CVE-2026-63978](https://nvd.nist.gov/vuln/detail/CVE-2026-63978), Public domain, modified 2026-11-12

---

Page: https://cve.day/CVE-2026-63978 · Whole record: https://cve.day/CVE-2026-63978.json · Rebuilt by cve.day 2026-11-25T22:59:28.886Z
