Vulnerability · Published Jan 31, 2025 · Assigned by Linux
CVE-2025-21683bpf: Fix bpf_sk_select_reuseport() memory leak
Medium 5.5
In plain English
A medium-severity memory leak in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 13% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix bpf_sk_select_reuseport() memory leak As pointed out in the original comment, lookup in sockmap can return a TCP ESTABLISHED socket. Such TCP socket may have had SO_ATTACH_REUSEPORT_EBPF set before it was ESTABLISHED. In other words, a non-NULL sk_reuseport_cb does not imply a non-refcounted socket. Drop sk's reference in both error paths. unreferenced object 0xffff888101911800 (size 2048): comm "test_progs", pid 44109, jiffies 4297131437 hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 80 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace (crc 9336483b): __kmalloc_noprof+0x3bf/0x560 __reuseport_alloc+0x1d/0x40 reuseport_alloc+0xca/0x150 reuseport_attach_prog+0x87/0x140 sk_reuseport_attach_bpf+0xc8/0x100 sk_setsockopt+0x1181/0x1990 do_sock_setsockopt+0x12b/0x160 __sys_setsockopt+0x7b/0xc0 __x64_sys_setsockopt+0x1b/0x30 do_syscall_64+0x93/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.128-1 | DEBIAN-CVE-2025-21683 |
| Debian:13 | linux | 6.12.11-1 | DEBIAN-CVE-2025-21683 |
| Debian:14 | linux | 6.12.11-1 | DEBIAN-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux | 5.15.0-135.146 | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux | 6.8.0-62.65 | USN-7595-1 |
| Ubuntu:24.04:LTS | linux | 6.8.0-62.65 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1080.87 | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1030.32 | USN-7595-1 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1030.32 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1030.32~22.04.1 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1030.32~22.04.1 | USN-7595-1 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1084.93 | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1030.35 | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1030.35 | USN-7596-1 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | 6.11.0-1013.13~24.04.1 | USN-7448-1 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | 6.11.0-1013.13~24.04.1 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1030.35~22.04.1 | USN-7596-1 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1030.35~22.04.1 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1084.93.1 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1018.19 | USN-7596-2 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1018.19 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1079.88 | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1031.33 | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1031.33 | USN-7595-5 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | 6.11.0-1013.13~24.04.1 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1031.33~22.04.1 | USN-7595-5 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1031.33~22.04.1 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1077.83 | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1026.30 | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1026.30 | USN-7595-1 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1062.70 | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1013.15 | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1013.15 | USN-7595-1 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | 6.11.0-24.24~24.04.1 | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | 6.11.0-24.24~24.04.1 | USN-7445-1 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-64.67~22.04.1 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1072.75 | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1027.27 | USN-7595-1 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1027.27 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1027.27~22.04.1 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | 5.15.0-1073.75 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1075.81 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1076.81 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-135.146 | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-62.65.1 | USN-7595-1 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-62.65.1 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | 6.11.0-1012.13~24.04.1 | USN-7445-1 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | 6.11.0-1012.13~24.04.1 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-62.65.1~22.04.1 | USN-7595-1 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-62.65.1~22.04.1 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1074.75 | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1029.32 | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1029.32 | USN-7595-1 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | 6.11.0-1007.7 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1029.32~22.04.1 | USN-7595-1 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1029.32~22.04.1 | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1029.32.1 | USN-7595-1 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1029.32.1 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1033.33 | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1008.8 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1021.21 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | 6.11.0-1020.20 | USN-7445-1 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | 6.11.0-1020.20 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1029.29 | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1029.29 | USN-7595-1 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1077.83 | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1027.28 | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1027.28 | USN-7595-4 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1027.28~22.04.1 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1027.28~22.04.1 | USN-7595-4 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1074.77 | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1029.33 | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1029.33 | USN-7595-4 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-62.65~22.04.1 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2025-21683 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1017.18 | UBUNTU-CVE-2025-21683 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1044.48 | UBUNTU-CVE-2025-21683 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 64d85290d79c0677edb5a8ee2295b36c022fa5df – before bb36838dac7bb334a3f3d7eb29875593ec9473fc64d85290d79c0677edb5a8ee2295b36c022fa5df – before 0ab52a8ca6e156a64c51b5e7456cac9a0ebfd9bf64d85290d79c0677edb5a8ee2295b36c022fa5df – before d0a3b3d1176d39218b8edb2a2d03164942ab9ccd64d85290d79c0677edb5a8ee2295b36c022fa5df – before b02e70be498b138e9c21701c2f33f4018ca7cd5e64d85290d79c0677edb5a8ee2295b36c022fa5df – before cccd51dd22574216e64e5d205489e634f86999f364d85290d79c0677edb5a8ee2295b36c022fa5df – before b3af60928ab9129befa65e6df0310d27300942bf |
| Linux | Linux | 5.8 |
Weakness: CWE-401 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
References
- https://git.kernel.org/stable/c/bb36838dac7bb334a3f3d7eb29875593ec9473fc
- https://git.kernel.org/stable/c/0ab52a8ca6e156a64c51b5e7456cac9a0ebfd9bf
- https://git.kernel.org/stable/c/d0a3b3d1176d39218b8edb2a2d03164942ab9ccd
- https://git.kernel.org/stable/c/b02e70be498b138e9c21701c2f33f4018ca7cd5e
- https://git.kernel.org/stable/c/cccd51dd22574216e64e5d205489e634f86999f3
- https://git.kernel.org/stable/c/b3af60928ab9129befa65e6df0310d27300942bf
- https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html
- https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html
- https://cert-portal.siemens.com/productcert/html/ssa-265688.html