CVE-2026-63979: net/handshake: hand off the pinned file reference to accept_doit
In the Linux kernel, the following vulnerability has been resolved:
net/handshake: hand off the pinned file reference to acceptdoit
handshakereqnext() removes the request from the per-net pending list and drops hnlock before handshakenlacceptdoit() reads req->hrsk->sksocket and dereferences sock->file (once in FDPREPARE() and again in getfile()). In that window a consumer running tlshandshakecancel() followed by sockfdput() (svcsockfree) or fputsync() (xsresettransport) releases sock->file. sockrelease() then runs sockorphan(), zeroing sksocket, and frees the struct socket. The accept-side code either reads NULL through sksocket or chases freed memory.
The submit-side sockhold() does not prevent this. skrefcnt protects struct sock, but struct socket and sock->file are independently refcounted via the file descriptor the consumer owns. Pinning sk leaves sock and sock->file unprotected.
Retarget the accept-side dereferences at req->hrfile, which was pinned at submit time, instead of req->hrsk->sksocket->file. Pinning on its own is not sufficient: a consumer that cancels between handshakereqnext() returning and acceptdoit reaching FDPREPARE() takes the !removepending() branch in handshakereqcancel() and drops hrfile before the accept side takes its own reference. Hand off an additional file reference inside handshakereqnext(), under hnlock, so the accept side operates on a reference that no concurrent handshakereqcancel() can revoke. FDPREPARE() consumes that handed-off reference, either by transferring it to the new fd in fdpublish() or by dropping it in the cleanup destructor on error; the explicit getfile() that previously balanced FDPREPARE() is therefore redundant and goes away.
Update handshakereqcanceltest2 and test3 to simulate the FDPREPARE() consumption with an fput() so the kunit file-count assertions stay balanced.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-63979?
The severity of CVE-2026-63979 is critical with a score of 9.8.
What vulnerabilities are associated with CVE-2026-63979?
CVE-2026-63979 can lead to denial of service and potential data corruption due to improper handling of socket references.
How do I fix CVE-2026-63979?
To fix CVE-2026-63979, update the Linux kernel to a version that includes the patch addressing this vulnerability.
How does CVE-2026-63979 affect system security?
CVE-2026-63979 poses risks such as unauthorized access and increased attack surface due to improper socket management.
Which systems are impacted by CVE-2026-63979?
CVE-2026-63979 affects all versions of the Linux kernel that have not been patched against this vulnerability.