Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 583353A254D for ; Sun, 19 Jul 2026 15:02:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784473334; cv=none; b=dY2OX95rKzmmdNjVocHVx+wlAchwMDxO/NBIdKczFoN+SNUVfkIDkjWLVg9aWLrXTegcDWcZKbba4UHivzRroO2Q8eRlZyo+TFnW86Zh/C8aGZ+bbgbOa3ufR5UT2GeKkoUQEGYVzcoJVdGshLDvXLsA2o3eVpc+mx5ttoHjCzk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784473334; c=relaxed/simple; bh=SxJZlJSWCMQVNd6b0jqk9/I9++KDXCuXO+uQKoInRfs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=YZYuiQphLJ04vhpdNaBnCgns51YV59ytURfza2yZsIVmWNTMoRJWL3HdkIVEMorj/X7Ur/3duopr64sfTPJYI1qZMkvfjdNG/vW6Zg47gDrv1RHij5ocgT0Kgi6fErXbzudDC6bHReZBp1dnpj5nPA2TfhlMwY8Sbpsurv2ZInE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=eBT1lnXX; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="eBT1lnXX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BBB501F000E9; Sun, 19 Jul 2026 15:02:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784473333; bh=NvUF09VQTWKYFdlGZPoc8ruuQO/CSEOzsHzcc653hOw=; h=From:To:Cc:Subject:Date:Reply-To; b=eBT1lnXX1pyOcc6ZZCXKpVDwGI3833ptiWsRS1wFAM4DdEQbvkSG0QHN+cHsJ3qGo R1WEyar2rCcg/1+3pXSvQc8O3o+/349f999YaQHJjdU2oHodSa8WT5laGdqH3fcSpn jlF4PF8PSqB5aS/uxednqsbf6XPzq2f4QrpY8Whc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-63978: net/handshake: Drain pending requests at net namespace exit Date: Sun, 19 Jul 2026 16:57:18 +0200 Message-ID: <2026071901-CVE-2026-63978-8f72@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4242; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ysK/N3ujnxalL5ZZiBqg7DueU8/WPjjiP1rOAVgW9Gc=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkxTxuDDny5bdwqmv3iVPt25u0XT3rP7W/kF1tXdifL0 070QUBXRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzkYxLDPPVnaoKmnEGRKxoY +rJPtvtNWqdQyDBPa1dG7+4NFZe8fJ0OfZzDE7S0ObAKAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman 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. The Linux kernel CVE team has assigned CVE-2026-63978 to this issue. Affected and fixed versions =========================== Issue introduced in 6.4 with commit 3b3009ea8abb713b022d94fba95ec270cf6e7eae and fixed in 6.12.93 with commit 9ec20c9a5a04f2c3f1cf65d21f886d7aaa6189cd Issue introduced in 6.4 with commit 3b3009ea8abb713b022d94fba95ec270cf6e7eae and fixed in 7.0.12 with commit 8c35539db0ab0bfa1ea44efab00b053261a69469 Issue introduced in 6.4 with commit 3b3009ea8abb713b022d94fba95ec270cf6e7eae and fixed in 7.1 with commit ea5fe6a73ca57e5150b8a38b341aef2636eb72f0 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-63978 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: net/handshake/netlink.c net/handshake/request.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/9ec20c9a5a04f2c3f1cf65d21f886d7aaa6189cd https://git.kernel.org/stable/c/8c35539db0ab0bfa1ea44efab00b053261a69469 https://git.kernel.org/stable/c/ea5fe6a73ca57e5150b8a38b341aef2636eb72f0