{"id":"CVE-2026-98925","aliases":["CVE-2026-98925"],"related":[],"kind":"vulnerability","state":"published","title":"bpf, sockmap: Fix self-redirect copied_seq double-counting","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf, sockmap: Fix self-redirect copied_seq double-counting\n\nWhen a BPF stream_verdict program redirects an skb back to the same\nsocket (self-redirect with BPF_F_INGRESS), sk_psock_verdict_apply()\ncalls tcp_eat_skb() which advances tcp_sk->copied_seq. However, the\nskb is then delivered to the socket's psock ingress queue and later\nread by tcp_bpf_recvmsg_parser(), which also advances copied_seq via\nthe copied_from_self accounting path. This double-counting causes\ncopied_seq to advance by 2x the actual data length, triggering:\n\n  TCP recvmsg seq # bug 2: copied BF2E806, seq BF2E7FD, \\\n\t\t\t   rcvnxt BF2E806, fl 0\n  WARNING: net/ipv4/tcp.c:2745 at tcp_recvmsg_locked+0x72b/0x2640\n  Call Trace:\n   tcp_recvmsg+0x10a/0x500\n   sock_recvmsg+0x168/0x1d0\n   __sys_recvfrom+0x19a/0x2a0\n   __x64_sys_recvfrom+0xe4/0x1f0\n   do_syscall_64+0xf7/0x530\n   entry_SYSCALL_64_after_hwframe+0x77/0x7f\n\n  cleanup rbuf bug: copied BF2E806 seq BF2E806 rcvnxt BF2E806\n  WARNING: net/ipv4/tcp.c:1609 at tcp_cleanup_rbuf+0xf2/0x1c0\n  Call Trace:\n   tcp_recvmsg_locked+0x8d1/0x2640\n   tcp_recvmsg+0x10a/0x500\n   sock_recvmsg+0x168/0x1d0\n   __sys_recvfrom+0x19a/0x2a0\n   __x64_sys_recvfrom+0xe4/0x1f0\n   do_syscall_64+0xf7/0x530\n   entry_SYSCALL_64_after_hwframe+0x77/0x7f\n\nFix this by converting self-redirect verdict to __SK_PASS at the\nbeginning of sk_psock_verdict_apply(). This bypasses the\n__SK_REDIRECT case entirely (which calls sk_psock_eat_skb), letting\nthe __SK_PASS path queue the skb to the psock ingress queue. The\ndata is then read via tcp_bpf_recvmsg_parser(), which advances\ncopied_seq exactly once through copied_from_self. Cross-socket\nredirects continue through __SK_REDIRECT with sk_psock_eat_skb()\nunchanged.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf, sockmap: Fix self-redirect copied_seq double-counting\n\nWhen a BPF stream_verdict program redirects an skb back to the same\nsocket (self-redirect with BPF_F_INGRESS), sk_psock_verdict_apply()\ncalls tcp_eat_skb() which advances tcp_sk->copied_seq. However, the\nskb is then delivered to the socket's psock ingress queue and later\nread by tcp_bpf_recvmsg_parser(), which also advances copied_seq via\nthe copied_from_self accounting path. This double-counting causes\ncopied_seq to advance by 2x the actual data length, triggering:\n\n  TCP recvmsg seq # bug 2: copied BF2E806, seq BF2E7FD, \\\n\t\t\t   rcvnxt BF2E806, fl 0\n  WARNING: net/ipv4/tcp.c:2745 at tcp_recvmsg_locked+0x72b/0x2640\n  Call Trace:\n   tcp_recvmsg+0x10a/0x500\n   sock_recvmsg+0x168/0x1d0\n   __sys_recvfrom+0x19a/0x2a0\n   __x64_sys_recvfrom+0xe4/0x1f0\n   do_syscall_64+0xf7/0x530\n   entry_SYSCALL_64_after_hwframe+0x77/0x7f\n\n  cleanup rbuf bug: copied BF2E806 seq BF2E806 rcvnxt BF2E806\n  WARNING: net/ipv4/tcp.c:1609 at tcp_cleanup_rbuf+0xf2/0x1c0\n  Call Trace:\n   tcp_recvmsg_locked+0x8d1/0x2640\n   tcp_recvmsg+0x10a/0x500\n   sock_recvmsg+0x168/0x1d0\n   __sys_recvfrom+0x19a/0x2a0\n   __x64_sys_recvfrom+0xe4/0x1f0\n   do_syscall_64+0xf7/0x530\n   entry_SYSCALL_64_after_hwframe+0x77/0x7f\n\nFix this by converting self-redirect verdict to __SK_PASS at the\nbeginning of sk_psock_verdict_apply(). This bypasses the\n__SK_REDIRECT case entirely (which calls sk_psock_eat_skb), letting\nthe __SK_PASS path queue the skb to the psock ingress queue. The\ndata is then read via tcp_bpf_recvmsg_parser(), which advances\ncopied_seq exactly once through copied_from_self. Cross-socket\nredirects continue through __SK_REDIRECT with sk_psock_eat_skb()\nunchanged.","source":"cvelist"}],"published":"2026-10-23T12:05:53.207Z","modified":"2026-10-23T13:17:13.210Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"fe735073a50eaa71aceb2e990827fe26f33cddd6","fixed":"cf9aefb26a071cb8b6fdd761c27e022a1184946d","status":"affected"},{"type":"git","introduced":"e5c6de5fa025882babf89cecbed80acf49b987fa","fixed":"dc98def81e3c629e25fcdd5753b1db93aab27ce9","status":"affected"},{"type":"git","introduced":"e5c6de5fa025882babf89cecbed80acf49b987fa","fixed":"ef6f2182fee6b9721c005ccfc6aec0a47f79bbfa","status":"affected"},{"type":"git","introduced":"e5c6de5fa025882babf89cecbed80acf49b987fa","fixed":"ae1ffd04e98beefbe5d83335d506b0bcd5c2a6b3","status":"affected"},{"type":"git","introduced":"e5c6de5fa025882babf89cecbed80acf49b987fa","fixed":"88942054191185c6f8bea5568cbb5614d1e99af9","status":"affected"},{"type":"git","introduced":"e5c6de5fa025882babf89cecbed80acf49b987fa","fixed":"490a83d6386eec1d29f470c8d7331677fb46c3b7","status":"affected"},{"type":"git","version":"f9b4a0b537be7a6e5f002ca64b09dcca9c14e6ed","status":"affected"},{"type":"semver","introduced":"6.1.32","fixed":"6.1.189","status":"affected"},{"type":"semver","introduced":"6.3.6","fixed":"6.4","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.4","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.4","status":"unaffected"},{"type":"semver","introduced":"6.1.189","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.158","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.112","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.55","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.2.9","lastAffected":"7.2.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.3","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/cf9aefb26a071cb8b6fdd761c27e022a1184946d","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/dc98def81e3c629e25fcdd5753b1db93aab27ce9","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ef6f2182fee6b9721c005ccfc6aec0a47f79bbfa","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ae1ffd04e98beefbe5d83335d506b0bcd5c2a6b3","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/88942054191185c6f8bea5568cbb5614d1e99af9","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/490a83d6386eec1d29f470c8d7331677fb46c3b7","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-98925","url":"https://www.cve.org/CVERecord?id=CVE-2026-98925","licence":"CVE Terms of Use","modified":"2026-10-23T12:05:53.207Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-98925","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98925","licence":"Public domain","modified":"2026-10-23T13:17:13.210Z"}],"updatedAt":"2026-11-25T22:59:46.912Z","epss":{"score":0.0019,"percentile":0.09029,"date":"2026-12-01T12:00:22.000Z"}}