UBUNTU-CVE-2026-98925: Medium severity ubuntu/linux-hwe-edge vulnerability
In the Linux kernel, the following vulnerability has been resolved: bpf, sockmap: Fix self-redirect copiedseq double-counting When a BPF streamverdict program redirects an skb back to the same socket (self-redirect with BPFFINGRESS), skpsockverdictapply() calls tcpeatskb() which advances tcpsk->copiedseq. However, the skb is then delivered to the socket's psock ingress queue and later read by tcpbpfrecvmsgparser(), which also advances copiedseq via the copiedfromself accounting path. This double-counting causes copiedseq 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 tcprecvmsglocked+0x72b/0x2640 Call Trace: tcprecvmsg+0x10a/0x500 sockrecvmsg+0x168/0x1d0 sysrecvfrom+0x19a/0x2a0 x64sysrecvfrom+0xe4/0x1f0 dosyscall64+0xf7/0x530 entrySYSCALL64afterhwframe+0x77/0x7f cleanup rbuf bug: copied BF2E806 seq BF2E806 rcvnxt BF2E806 WARNING: net/ipv4/tcp.c:1609 at tcpcleanuprbuf+0xf2/0x1c0 Call Trace: tcprecvmsglocked+0x8d1/0x2640 tcprecvmsg+0x10a/0x500 sockrecvmsg+0x168/0x1d0 sysrecvfrom+0x19a/0x2a0 x64sysrecvfrom+0xe4/0x1f0 dosyscall64+0xf7/0x530 entrySYSCALL64afterhwframe+0x77/0x7f Fix this by converting self-redirect verdict to SKPASS at the beginning of skpsockverdictapply(). This bypasses the SKREDIRECT case entirely (which calls skpsockeatskb), letting the SKPASS path queue the skb to the psock ingress queue. The data is then read via tcpbpfrecvmsgparser(), which advances copiedseq exactly once through copiedfromself. Cross-socket redirects continue through SKREDIRECT with skpsockeatskb() unchanged.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-hwe-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-42.42 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1016.17 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1016.18 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1015.16 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1 - Compensating control
Convert self-redirect verdicts to __SK_PASS at the beginning of sk_psock_verdict_apply() to prevent copied_seq double-counting.
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems using the listed Ubuntu kernel packages are exposed when they use BPF sockmap stream_verdict processing and a program can redirect a packet back to the same socket with BPF_F_INGRESS. The affected package list includes linux-riscv, linux-realtime, linux-azure, linux-gcp, linux-azure-fde, linux-gke, linux-hwe-edge, and linux-gkeop.
What conditions are required to trigger the bug?
A BPF stream_verdict program must perform a self-redirect of an skb back to the same socket using BPF_F_INGRESS. The issue occurs when TCP receive processing later handles that skb through the psock ingress queue, causing copied_seq accounting to be applied twice.
How would this appear on an affected system?
The kernel can emit TCP receive-path warnings, including "TCP recvmsg seq # bug 2" at tcp_recvmsg_locked and a "cleanup rbuf bug" warning at tcp_cleanup_rbuf. The call traces involve recvmsg processing, such as tcp_recvmsg, sock_recvmsg, and recvfrom.