# CVE-2025-37959: bpf: Scrub packet on bpf\_redirect\_peer

- Priority: **Prioritise**
- Reason: Severe, CVSS 9.4 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 0% (FIRST, 04-12-2026)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2025-05-20 · Modified: 2026-11-10
- Aliases: UBUNTU-CVE-2025-37959, DEBIAN-CVE-2025-37959
- Record: https://cvemate.com/vulnerability/CVE-2025-37959 · JSON: https://cvemate.com/vulnerability/CVE-2025-37959/json

## Description

```text
In the Linux kernel, the following vulnerability has been resolved:

bpf: Scrub packet on bpf_redirect_peer

When bpf_redirect_peer is used to redirect packets to a device in
another network namespace, the skb isn't scrubbed. That can lead skb
information from one namespace to be "misused" in another namespace.

As one example, this is causing Cilium to drop traffic when using
bpf_redirect_peer to redirect packets that just went through IPsec
decryption to a container namespace. The following pwru trace shows (1)
the packet path from the host's XFRM layer to the container's XFRM
layer where it's dropped and (2) the number of active skb extensions at
each function.

    NETNS       MARK  IFACE  TUPLE                                FUNC
    4026533547  d00   eth0   10.244.3.124:35473->10.244.2.158:53  xfrm_rcv_cb
                             .active_extensions = (__u8)2,
    4026533547  d00   eth0   10.244.3.124:35473->10.244.2.158:53  xfrm4_rcv_cb
                             .active_extensions = (__u8)2,
    4026533547  d00   eth0   10.244.3.124:35473->10.244.2.158:53  gro_cells_receive
                             .active_extensions = (__u8)2,
    [...]
    4026533547  0     eth0   10.244.3.124:35473->10.244.2.158:53  skb_do_redirect
                             .active_extensions = (__u8)2,
    4026534999  0     eth0   10.244.3.124:35473->10.244.2.158:53  ip_rcv
                             .active_extensions = (__u8)2,
    4026534999  0     eth0   10.244.3.124:35473->10.244.2.158:53  ip_rcv_core
                             .active_extensions = (__u8)2,
    [...]
    4026534999  0     eth0   10.244.3.124:35473->10.244.2.158:53  udp_queue_rcv_one_skb
                             .active_extensions = (__u8)2,
    4026534999  0     eth0   10.244.3.124:35473->10.244.2.158:53  __xfrm_policy_check
                             .active_extensions = (__u8)2,
    4026534999  0     eth0   10.244.3.124:35473->10.244.2.158:53  __xfrm_decode_session
                             .active_extensions = (__u8)2,
    4026534999  0     eth0   10.244.3.124:35473->10.244.2.158:53  security_xfrm_decode_session
                             .active_extensions = (__u8)2,
    4026534999  0     eth0   10.244.3.124:35473->10.244.2.158:53  kfree_skb_reason(SKB_DROP_REASON_XFRM_POLICY)
                             .active_extensions = (__u8)2,

In this case, there are no XFRM policies in the container's network
namespace so the drop is unexpected. When we decrypt the IPsec packet,
the XFRM state used for decryption is set in the skb extensions. This
information is preserved across the netns switch. When we reach the
XFRM policy check in the container's netns, __xfrm_policy_check drops
the packet with LINUX_MIB_XFRMINNOPOLS because a (container-side) XFRM
policy can't be found that matches the (host-side) XFRM state used for
decryption.

This patch fixes this by scrubbing the packet when using
bpf_redirect_peer, as is done on typical netns switches via veth
devices except skb->mark and skb->tstamp are not zeroed.
```

## Signals

- CVSS: 9.4 critical (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H
- EPSS: 0.384%, percentile 34.626%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 138)

- debian linux (Debian): \< 6.1.140-1 \| \< 6.12.29-1
- ubuntu linux (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-100.100
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-1046.49
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.14 (Ubuntu): \< 6.14.0-1011.11~24.04.1
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1046.49~22.04.1
- ubuntu linux-aws-fips (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-1046.49+fips1
- ubuntu linux-azure (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-1046.52
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.15 (Ubuntu): All versions (No fix recorded)

## References (first 20 of 31)

- <https://git.kernel.org/stable/c/de1067cc8cf0e8c11ae20cbe5c467aef19d04ded>
- <https://git.kernel.org/stable/c/355b0526336c0bf2bf7feaca033568ede524f763>
- <https://git.kernel.org/stable/c/b37e54259cab4f78b53953d6f6268b85f07bef3e>
- <https://git.kernel.org/stable/c/9e15ef33ba39fb6d9d1f51445957f16983a9437a>
- <https://git.kernel.org/stable/c/c4327229948879814229b46aa26a750718888503>
- <https://lists.debian.org/debian-lts-announce/2025/08/msg00010.html>
- <https://cert-portal.siemens.com/productcert/html/ssa-019113.html>
- <https://ubuntu.com/security/CVE-2025-37959>
- <https://www.cve.org/CVERecord?id=CVE-2025-37959>
- <https://git.kernel.org/linus/c4327229948879814229b46aa26a750718888503>
- <https://ubuntu.com/security/notices/USN-7699-1>
- <https://ubuntu.com/security/notices/USN-7699-2>
- <https://ubuntu.com/security/notices/USN-7721-1>
- <https://ubuntu.com/security/notices/USN-8028-1>
- <https://ubuntu.com/security/notices/USN-8028-2>
- <https://ubuntu.com/security/notices/USN-8031-1>
- <https://ubuntu.com/security/notices/USN-8028-3>
- <https://ubuntu.com/security/notices/USN-8028-4>
- <https://ubuntu.com/security/notices/USN-8028-5>
- <https://ubuntu.com/security/notices/USN-8031-2>

---

Data as of 2026-12-05T05:08:18.058Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
