CWE
401
Advisory Published
Updated

CVE-2025-21683: bpf: Fix bpf_sk_select_reuseport() memory leak

First published: Fri Jan 31 2025(Updated: )

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

Credit: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Affected SoftwareAffected VersionHow to fix
Linux Kernel
Linux Kernel>=5.8<5.15.177
Linux Kernel>=5.16<6.1.127
Linux Kernel>=6.2<6.6.74
Linux Kernel>=6.7<6.12.11
Linux Kernel=6.13-rc1
Linux Kernel=6.13-rc2
Linux Kernel=6.13-rc3
Linux Kernel=6.13-rc4
Linux Kernel=6.13-rc5
Linux Kernel=6.13-rc6
Linux Kernel=6.13-rc7

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is the severity of CVE-2025-21683?

    CVE-2025-21683 has a medium severity rating due to its impact on memory management in the Linux kernel.

  • How do I fix CVE-2025-21683?

    To fix CVE-2025-21683, you should apply the latest patches provided by the Linux kernel updates.

  • What does CVE-2025-21683 affect?

    CVE-2025-21683 affects the Linux kernel, specifically the bpf_sk_select_reuseport function.

  • What type of vulnerability is CVE-2025-21683?

    CVE-2025-21683 is classified as a memory leak vulnerability in the Linux kernel.

  • When was CVE-2025-21683 disclosed?

    CVE-2025-21683 was disclosed in recent kernel revisions addressing memory management issues.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203