CVE-2025-21683

Source
https://cve.org/CVERecord?id=CVE-2025-21683
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-21683.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-21683
Downstream
Related
Published
2025-01-31T11:25:42.903Z
Modified
2026-05-07T04:18:20.926585Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
bpf: Fix bpf_sk_select_reuseport() memory leak
Details

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

bpf: Fix bpfskselect_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 SOATTACHREUSEPORTEBPF set before it was ESTABLISHED. In other words, a non-NULL skreuseport_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 __reuseportalloc+0x1d/0x40 reuseportalloc+0xca/0x150 reuseportattachprog+0x87/0x140 skreuseportattachbpf+0xc8/0x100 sksetsockopt+0x1181/0x1990 dosocksetsockopt+0x12b/0x160 __sys_setsockopt+0x7b/0xc0 __x64syssetsockopt+0x1b/0x30 dosyscall64+0x93/0x180 entrySYSCALL64afterhwframe+0x76/0x7e

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21683.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
64d85290d79c0677edb5a8ee2295b36c022fa5df
Fixed
bb36838dac7bb334a3f3d7eb29875593ec9473fc
Fixed
0ab52a8ca6e156a64c51b5e7456cac9a0ebfd9bf
Fixed
d0a3b3d1176d39218b8edb2a2d03164942ab9ccd
Fixed
b02e70be498b138e9c21701c2f33f4018ca7cd5e
Fixed
cccd51dd22574216e64e5d205489e634f86999f3
Fixed
b3af60928ab9129befa65e6df0310d27300942bf

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-21683.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.8.0
Fixed
5.10.234
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.177
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.127
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.74
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.11

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-21683.json"