IM
IronMonkey Threat Research

CVE-2025-21683 MEDIUM

Published: 2025-01-31 | Last Modified: 2026-05-12 | Status: Modified

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

Additional Descriptions (1)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: bpf: Se solucionó la pérdida de memoria de bpf_sk_select_reuseport() Como se señaló en el comentario original, la búsqueda en sockmap puede devolver un socket TCP ESTABLISHED. Es posible que dicho socket TCP haya tenido SO_ATTACH_REUSEPORT_EBPF configurado antes de que se estableciera. En otras palabras, un sk_reuseport_cb que no sea NULL no implica un socket sin referencia. Elimine la referencia de sk en ambas rutas de error. objeto sin referencia 0xffff888101911800 (tamaño 2048): comm "test_progs", pid 44109, jiffies 4297131437 volcado hexadecimal (primeros 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 ................ seguimiento inverso (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 entrada_SYSCALL_64_después_hwframe+0x76/0x7e

CVSS Metrics

Base Score: 5.5 (MEDIUM)

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Attack VectorLOCAL
Attack ComplexityLOW
Privileges RequiredLOW
User InteractionNONE
ScopeUNCHANGED
Confidentiality ImpactNONE
Integrity ImpactNONE
Availability ImpactHIGH

Source: [email protected]

Type: Primary

Exploitability Score: 1.8

Impact Score: 3.6

Weaknesses

Source Type Description
[email protected] Primary
en CWE-401
134c704f-9b21-4f2e-91b3-4a467353bcc0 Secondary
en CWE-401

Affected Products

Vendor Product Version Update Type
linux linux_kernel * <built-in method update of dict object at 0x7fd3606adec0> Operating System
linux linux_kernel * <built-in method update of dict object at 0x7fd3401f0040> Operating System
linux linux_kernel * <built-in method update of dict object at 0x7fd3401f08c0> Operating System
linux linux_kernel * <built-in method update of dict object at 0x7fd3401f1b00> Operating System
linux linux_kernel 6.13 <built-in method update of dict object at 0x7fd3401f3480> Operating System
linux linux_kernel 6.13 <built-in method update of dict object at 0x7fd3401f3980> Operating System
linux linux_kernel 6.13 <built-in method update of dict object at 0x7fd3606aea00> Operating System
linux linux_kernel 6.13 <built-in method update of dict object at 0x7fd3606af340> Operating System
linux linux_kernel 6.13 <built-in method update of dict object at 0x7fd3606ae0c0> Operating System
linux linux_kernel 6.13 <built-in method update of dict object at 0x7fd3401f1240> Operating System
linux linux_kernel 6.13 <built-in method update of dict object at 0x7fd3606aff80> Operating System

Affected Configurations

Operator: OR

Vulnerable CPE
Yes cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Yes cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Yes cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Yes cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Yes cpe:2.3:o:linux:linux_kernel:6.13:rc1:*:*:*:*:*:*
Yes cpe:2.3:o:linux:linux_kernel:6.13:rc2:*:*:*:*:*:*
Yes cpe:2.3:o:linux:linux_kernel:6.13:rc3:*:*:*:*:*:*
Yes cpe:2.3:o:linux:linux_kernel:6.13:rc4:*:*:*:*:*:*
Yes cpe:2.3:o:linux:linux_kernel:6.13:rc5:*:*:*:*:*:*
Yes cpe:2.3:o:linux:linux_kernel:6.13:rc6:*:*:*:*:*:*
Yes cpe:2.3:o:linux:linux_kernel:6.13:rc7:*:*:*:*:*:*

References