Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792758120; b=Nm3WS8ktzM5et/IXFFntmIjw2upZUI2cYZSLd/1Zwc75WOX3z1KKU5fMr2fGcXo1168x dQZFYbUNg2AkUb8mNkbBue6vJWas8yXRjCf//pOB2iC15ANzr3mSeoFo4JWvQRGV9C1i7 54AdL/qoBSSdO1N2M5SR6m+vRWnDsKTMCIs1Ws1Oyub/SVXXvreYoaLo3F3Gs3qicuTji l+KsUNPROMCsQ66l0mP81Ingn/CuVQXF0Qx/79VWfsj3zfZNcAJtrcnTEXToJDYFpreqK c+mM8AGLGTT7/xxAYPxFngmpkZ9mvbmrkMDWgJ3rcTmtbljQ6o3qJ42vcdf4Q31SGsA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792758120; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=Rtlho8MMdTXUrA1WCcG2vk5zUf7p15ylGcxgWUp+yao=; b=nj15baEhv33JZGCUxa8GR2TLcZnpI/LCQw1tHhtnvWyUClqs5l60PmCb+9/q95GeSReW 2NteMwRmYERfvLwDOMYYsI7GrrFJGp0D1uw0JhZ2d1WdEvLhkUZYZdhgNgH4q99SpqlOg /xGDAfCuEapTQx7uYIDhJai125L9EWhwxnsSeCJeAOceBbZ6xXHdPdpXQ4n8VgWT/Skc4 XsKJFOl1xmQRn35pYAE/ZY2cAE0JMrisl8BENsmf4gkn/Rr/o1ttcpSuRZai4Xboj8Gqo 3dO+LttNir3p3Hlfvwq+F2mjL72nWtulmask+jlVbGrF/TZGpYxQHE8QK4NZMsqhh5A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=qDExzU26; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D99A606A31A for ; Fri, 23 Oct 2026 12:22:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=qDExzU26 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 982551F01825; Fri, 23 Oct 2026 12:21:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792758119; bh=Rtlho8MMdTXUrA1WCcG2vk5zUf7p15ylGcxgWUp+yao=; h=From:To:Cc:Subject:Date:Reply-To; b=qDExzU26a1+JRVHgT2/+o4gGf4eZOQI4G+9H3QnBn1CuS/eoeuLjHV0OmqY2wbeqo fUrJRrRamVnc1snNCVmX/0R/zvPGc3ZQ1NKuqroDrO4NELUHmDlDE7JjuE2jXIHBZ1 MsOjtKuZMm8bH5r+ohaoI9i4nrxIKGRNCR5JgD3Q= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98925: bpf, sockmap: Fix self-redirect copied_seq double-counting Date: Fri, 23 Oct 2026 14:01:46 +0200 Message-ID: <2026102339-CVE-2026-98925-5731@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4436; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=u+pUzcS6pxG0ZYdmPd51SMGxpibSS5f55LWSfYseBQw=; b=owGbwMvMwCRo6H6F97bub03G02pJDFm3fZZUHbqqw7Bnh6im1V7zj/fXysdrlZlviD1+jn+qs NPEn8ZTO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiuukMC25MrZPbXhpm7bnI p9h626WXYXnBvxjm+2+U8We+tpR3QvwqsdnzExWk1ORSAA== 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: bpf, sockmap: Fix self-redirect copied_seq double-counting When a BPF stream_verdict program redirects an skb back to the same socket (self-redirect with BPF_F_INGRESS), sk_psock_verdict_apply() calls tcp_eat_skb() which advances tcp_sk->copied_seq. However, the skb is then delivered to the socket's psock ingress queue and later read by tcp_bpf_recvmsg_parser(), which also advances copied_seq via the copied_from_self accounting path. This double-counting causes copied_seq to advance by 2x the actual data length, triggering: TCP recvmsg seq # bug 2: copied BF2E806, seq BF2E7FD, \ rcvnxt BF2E806, fl 0 WARNING: net/ipv4/tcp.c:2745 at tcp_recvmsg_locked+0x72b/0x2640 Call Trace: tcp_recvmsg+0x10a/0x500 sock_recvmsg+0x168/0x1d0 __sys_recvfrom+0x19a/0x2a0 __x64_sys_recvfrom+0xe4/0x1f0 do_syscall_64+0xf7/0x530 entry_SYSCALL_64_after_hwframe+0x77/0x7f cleanup rbuf bug: copied BF2E806 seq BF2E806 rcvnxt BF2E806 WARNING: net/ipv4/tcp.c:1609 at tcp_cleanup_rbuf+0xf2/0x1c0 Call Trace: tcp_recvmsg_locked+0x8d1/0x2640 tcp_recvmsg+0x10a/0x500 sock_recvmsg+0x168/0x1d0 __sys_recvfrom+0x19a/0x2a0 __x64_sys_recvfrom+0xe4/0x1f0 do_syscall_64+0xf7/0x530 entry_SYSCALL_64_after_hwframe+0x77/0x7f Fix this by converting self-redirect verdict to __SK_PASS at the beginning of sk_psock_verdict_apply(). This bypasses the __SK_REDIRECT case entirely (which calls sk_psock_eat_skb), letting the __SK_PASS path queue the skb to the psock ingress queue. The data is then read via tcp_bpf_recvmsg_parser(), which advances copied_seq exactly once through copied_from_self. Cross-socket redirects continue through __SK_REDIRECT with sk_psock_eat_skb() unchanged. The Linux kernel CVE team has assigned CVE-2026-98925 to this issue. Affected and fixed versions =========================== Issue introduced in 6.1.32 with commit fe735073a50eaa71aceb2e990827fe26f33cddd6 and fixed in 6.1.189 with commit cf9aefb26a071cb8b6fdd761c27e022a1184946d Issue introduced in 6.4 with commit e5c6de5fa025882babf89cecbed80acf49b987fa and fixed in 6.6.158 with commit dc98def81e3c629e25fcdd5753b1db93aab27ce9 Issue introduced in 6.4 with commit e5c6de5fa025882babf89cecbed80acf49b987fa and fixed in 6.12.112 with commit ef6f2182fee6b9721c005ccfc6aec0a47f79bbfa Issue introduced in 6.4 with commit e5c6de5fa025882babf89cecbed80acf49b987fa and fixed in 6.18.55 with commit ae1ffd04e98beefbe5d83335d506b0bcd5c2a6b3 Issue introduced in 6.4 with commit e5c6de5fa025882babf89cecbed80acf49b987fa and fixed in 7.2.9 with commit 88942054191185c6f8bea5568cbb5614d1e99af9 Issue introduced in 6.4 with commit e5c6de5fa025882babf89cecbed80acf49b987fa and fixed in 7.3 with commit 490a83d6386eec1d29f470c8d7331677fb46c3b7 Issue introduced in 6.3.6 with commit f9b4a0b537be7a6e5f002ca64b09dcca9c14e6ed 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-98925 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/core/skmsg.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/cf9aefb26a071cb8b6fdd761c27e022a1184946d https://git.kernel.org/stable/c/dc98def81e3c629e25fcdd5753b1db93aab27ce9 https://git.kernel.org/stable/c/ef6f2182fee6b9721c005ccfc6aec0a47f79bbfa https://git.kernel.org/stable/c/ae1ffd04e98beefbe5d83335d506b0bcd5c2a6b3 https://git.kernel.org/stable/c/88942054191185c6f8bea5568cbb5614d1e99af9 https://git.kernel.org/stable/c/490a83d6386eec1d29f470c8d7331677fb46c3b7