Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 74D9D3ACF05 for ; Wed, 25 Mar 2026 10:29:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774434578; cv=none; b=bG27/EuV8oTBdyiwthIogjDlSXsza3zbMgivrmvzY3ily8OwT2uBcbMP3b1PUTHXKuZ067gzjAdtRJJY2Hlfc/FxIUMaMVFu7YiYdxU8TLDvgbFcu0n18WN4TNDrUpfe8v8SYslnLBsZVxDrKl3B53P3shKwE30QN+jtjPYPxe8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774434578; c=relaxed/simple; bh=aJca17dA4VUzzy0DZUoBTXJxWnZUHDD9tgVvexr1bQk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=lDtRCe15Fkfrz+e1RaJZTpCg6vL/DpzRdxywQBRorx4esoiuFWO32xpDINC6FgugjBEAxdOqLEARwPJhHt7m+gUgOAt5eTKQPyx44FWLLtXVYXdKFA/mJB3wdno8oKwmMEXokHZNpkXp7dsjn+oGOd3rYkWhbUdSrXoE71Pwhhk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=CJe1lcaj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="CJe1lcaj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B148FC4CEF7; Wed, 25 Mar 2026 10:29:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774434578; bh=aJca17dA4VUzzy0DZUoBTXJxWnZUHDD9tgVvexr1bQk=; h=From:To:Cc:Subject:Date:Reply-To:From; b=CJe1lcaj8dUv4QsnGzYeCkR2WqP3/ZTQdW6c+cn1P2JZiNC2x0hWgGC8mezq1vFeS 9mnOANyoe8cjU4tK/hc1gOhz6tjPEhU2gPbvSrIsZYRVCt+AVel0IHQZRpth46BDHq ib2ah/iqd9DDK5CDDZTKwGQsmOyfB/R0KKVRWf2k= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-23331: udp: Unhash auto-bound connected sk from 4-tuple hash table when disconnected. Date: Wed, 25 Mar 2026 11:27:15 +0100 Message-ID: <2026032532-CVE-2026-23331-735b@gregkh> X-Mailer: git-send-email 2.53.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=2736; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=YEEQyykSkeqq36CSGg/r+7dJ/djiu6hkuI6P0pFbWIk=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmHd0Syh+5+xry0W6xa4cPMdzcvqUvad/pxeEZ6cAdPK FrofGtGRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExkw1SGuWIhL1Yu1Dr40Vdz V3Ba/artodrPrzPMz+JQXX0qoGT+e5HyX2uvLQw7vnrXYgA= 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: udp: Unhash auto-bound connected sk from 4-tuple hash table when disconnected. Let's say we bind() an UDP socket to the wildcard address with a non-zero port, connect() it to an address, and disconnect it from the address. bind() sets SOCK_BINDPORT_LOCK on sk->sk_userlocks (but not SOCK_BINDADDR_LOCK), and connect() calls udp_lib_hash4() to put the socket into the 4-tuple hash table. Then, __udp_disconnect() calls sk->sk_prot->rehash(sk). It computes a new hash based on the wildcard address and moves the socket to a new slot in the 4-tuple hash table, leaving a garbage in the chain that no packet hits. Let's remove such a socket from 4-tuple hash table when disconnected. Note that udp_sk(sk)->udp_portaddr_hash needs to be udpated after udp_hash4_dec(hslot2) in udp_unhash4(). The Linux kernel CVE team has assigned CVE-2026-23331 to this issue. Affected and fixed versions =========================== Issue introduced in 6.13 with commit 78c91ae2c6deb5d236a5a93ff2995cdd05514380 and fixed in 6.18.17 with commit b955350778b8715e1b7885179979b3a68221c0fb Issue introduced in 6.13 with commit 78c91ae2c6deb5d236a5a93ff2995cdd05514380 and fixed in 6.19.7 with commit 3b8f104880c104151f8c30f2f89df81fb59a286c Issue introduced in 6.13 with commit 78c91ae2c6deb5d236a5a93ff2995cdd05514380 and fixed in 7.0-rc3 with commit 6996a2d2d0a64808c19c98002aeb5d9d1b2df6a4 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-23331 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/ipv4/udp.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/b955350778b8715e1b7885179979b3a68221c0fb https://git.kernel.org/stable/c/3b8f104880c104151f8c30f2f89df81fb59a286c https://git.kernel.org/stable/c/6996a2d2d0a64808c19c98002aeb5d9d1b2df6a4