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

net/handshake: hand off the pinned file reference to accept_doit

handshake_req_next() removes the request from the per-net
pending list and drops hn_lock before handshake_nl_accept_doit()
reads req->hr_sk->sk_socket and dereferences sock->file (once in
FD_PREPARE() and again in get_file()). In that window a
consumer running tls_handshake_cancel() followed by sockfd_put()
(svc_sock_free) or __fput_sync() (xs_reset_transport) releases
sock->file. sock_release() then runs sock_orphan(), zeroing
sk_socket, and frees the struct socket. The accept-side code
either reads NULL through sk_socket or chases freed memory.

The submit-side sock_hold() does not prevent this. sk_refcnt
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->hr_file, which was
pinned at submit time, instead of req->hr_sk->sk_socket->file.
Pinning on its own is not sufficient: a consumer that cancels
between handshake_req_next() returning and accept_doit reaching
FD_PREPARE() takes the !remove_pending() branch in
handshake_req_cancel() and drops hr_file before the accept side
takes its own reference. Hand off an additional file reference
inside handshake_req_next(), under hn_lock, so the accept side
operates on a reference that no concurrent handshake_req_cancel()
can revoke. FD_PREPARE() consumes that handed-off reference,
either by transferring it to the new fd in fd_publish() or by
dropping it in the cleanup destructor on error; the explicit
get_file() that previously balanced FD_PREPARE() is therefore
redundant and goes away.

Update handshake_req_cancel_test2 and _test3 to simulate the
FD_PREPARE() consumption with an fput() so the kunit file-count
assertions stay balanced.
Published: 2026-07-19
Score: 9.8 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability occurs in the Linux kernel's network handshake handling. During a TLS handshake, a consumer can cancel the request after it has been removed from the pending list but before the accept side pins the associated file. Because the socket and file structures are reference‑counted independently, the accept side may dereference a NULL or freed socket or file object, giving an attacker the ability to trigger arbitrary memory reads or writes and potentially execute code or crash the system. The flaw is a classic use‑after‑free (CWE‑825) caused by inadequate reference counting that allows a race condition between handshake cleanup and accept processing.

Affected Systems

The affected product is the Linux kernel. Vendor information is provided as "Linux:Linux", indicating all kernel builds that include the net/handshake path. No specific version range is supplied, so any kernel that contains the unpatched handshake code is potentially vulnerable until the fix is applied.

Risk and Exploitability

The CVSS score is 9.8, indicating critical severity. The EPSS score is less than 1%, suggesting that while the flaw is severe, current exploitation activity is low or not yet observed. The vulnerability is not listed in the CISA KEV catalog, so no confirmed exploits have been reported up to the time of this analysis. The likely attack vector is a remote TLS handshake cancellation that occurs before the accept side pins the file reference; this inference is based on the description of the race between handshake_req_next() and handshake_req_cancel(). The conclusion that the flaw can be exploited remotely over the network is inferred rather than explicitly stated in the description, but it follows from the fact that the attacker can manipulate TLS handshake requests from user space. This inference indicates a serious risk for servers hosting TLS services.

Generated by OpenCVE AI on August 4, 2026 at 18:08 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that includes the handshake reference‑counting fix; this directly mitigates the CWE‑825 use‑after‑free vulnerability.
  • If an upgrade is not possible immediately, apply the vendor‑supplied patch or backport the changes from commit c06876d4fac38f35820946ee3b1be7d7da799cd4 or f4251190e58b209999c1ba9e6d2976136a1be055 to correct the reference counting, thereby fixing the CWE‑825 flaw.
  • After updating, run regression tests and verify that TLS services no longer crash; confirm that the handshake‑cancellation paths now retain a valid file reference.
  • If a kernel patch cannot be applied or tested in the near term, limit TLS traffic to trusted hosts and monitor for abnormal socket closures or system crashes indicative of an exploitation attempt.

Generated by OpenCVE AI on August 4, 2026 at 18:08 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Ubuntu USN Ubuntu USN USN-8593-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8603-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8618-1 Linux kernel vulnerabilities
History

Sun, 09 Aug 2026 18:45:00 +0000


Wed, 22 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-825
References
Metrics threat_severity

None

threat_severity

Moderate


Mon, 20 Jul 2026 14:45:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}


Sun, 19 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: net/handshake: hand off the pinned file reference to accept_doit handshake_req_next() removes the request from the per-net pending list and drops hn_lock before handshake_nl_accept_doit() reads req->hr_sk->sk_socket and dereferences sock->file (once in FD_PREPARE() and again in get_file()). In that window a consumer running tls_handshake_cancel() followed by sockfd_put() (svc_sock_free) or __fput_sync() (xs_reset_transport) releases sock->file. sock_release() then runs sock_orphan(), zeroing sk_socket, and frees the struct socket. The accept-side code either reads NULL through sk_socket or chases freed memory. The submit-side sock_hold() does not prevent this. sk_refcnt 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->hr_file, which was pinned at submit time, instead of req->hr_sk->sk_socket->file. Pinning on its own is not sufficient: a consumer that cancels between handshake_req_next() returning and accept_doit reaching FD_PREPARE() takes the !remove_pending() branch in handshake_req_cancel() and drops hr_file before the accept side takes its own reference. Hand off an additional file reference inside handshake_req_next(), under hn_lock, so the accept side operates on a reference that no concurrent handshake_req_cancel() can revoke. FD_PREPARE() consumes that handed-off reference, either by transferring it to the new fd in fd_publish() or by dropping it in the cleanup destructor on error; the explicit get_file() that previously balanced FD_PREPARE() is therefore redundant and goes away. Update handshake_req_cancel_test2 and _test3 to simulate the FD_PREPARE() consumption with an fput() so the kunit file-count assertions stay balanced.
Title net/handshake: hand off the pinned file reference to accept_doit
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-09T18:34:56.283Z

Reserved: 2026-07-19T07:54:57.025Z

Link: CVE-2026-63979

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-19T00:00:00Z

Links: CVE-2026-63979 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-04T18:15:03Z

Weaknesses
  • CWE-825

    Expired Pointer Dereference