CVE-2025-22109

In the Linux kernel, the following vulnerability has been resolved: ax25: Remove broken autobind Binding AX25 socket by using the autobind feature leads to memory leaks in ax25_connect() and also refcount leaks in ax25_release(). Memory leak was detected with kmemleak: ================================================================ unreferenced object 0xffff8880253cd680 (size 96): backtrace: __kmalloc_node_track_caller_noprof (./include/linux/kmemleak.h:43) kmemdup_noprof (mm/util.c:136) ax25_rt_autobind (net/ax25/ax25_route.c:428) ax25_connect (net/ax25/af_ax25.c:1282) __sys_connect_file (net/socket.c:2045) __sys_connect (net/socket.c:2064) __x64_sys_connect (net/socket.c:2067) do_syscall_64 (arch/x86/entry/common.c:52 arch/x86/entry/common.c:83) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) ================================================================ When socket is bound, refcounts must be incremented the way it is done in ax25_bind() and ax25_setsockopt() (SO_BINDTODEVICE). In case of autobind, the refcounts are not incremented. This bug leads to the following issue reported by Syzkaller: ================================================================ ax25_connect(): syz-executor318 uses autobind, please contact jreuter@yaina.de ------------[ cut here ]------------ refcount_t: decrement hit 0; leaking memory. WARNING: CPU: 0 PID: 5317 at lib/refcount.c:31 refcount_warn_saturate+0xfa/0x1d0 lib/refcount.c:31 Modules linked in: CPU: 0 UID: 0 PID: 5317 Comm: syz-executor318 Not tainted 6.14.0-rc4-syzkaller-00278-gece144f151ac #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 RIP: 0010:refcount_warn_saturate+0xfa/0x1d0 lib/refcount.c:31 ... Call Trace: <TASK> __refcount_dec include/linux/refcount.h:336 [inline] refcount_dec include/linux/refcount.h:351 [inline] ref_tracker_free+0x6af/0x7e0 lib/ref_tracker.c:236 netdev_tracker_free include/linux/netdevice.h:4302 [inline] netdev_put include/linux/netdevice.h:4319 [inline] ax25_release+0x368/0x960 net/ax25/af_ax25.c:1080 __sock_release net/socket.c:647 [inline] sock_close+0xbc/0x240 net/socket.c:1398 __fput+0x3e9/0x9f0 fs/file_table.c:464 __do_sys_close fs/open.c:1580 [inline] __se_sys_close fs/open.c:1565 [inline] __x64_sys_close+0x7f/0x110 fs/open.c:1565 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f ... </TASK> ================================================================ Considering the issues above and the comments left in the code that say: "check if we can remove this feature. It is broken."; "autobinding in this may or may not work"; - it is better to completely remove this feature than to fix it because it is broken and leads to various kinds of memory bugs. Now calling connect() without first binding socket will result in an error (-EINVAL). Userspace software that relies on the autobind feature might get broken. However, this feature does not seem widely used with this specific driver as it was not reliable at any point of time, and it is already broken anyway. E.g. ax25-tools and ax25-apps packages for popular distributions do not use the autobind feature for AF_AX25. Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.12:-:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.12:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.12:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.12:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.12:rc5:*:*:*:*:*:*

History

03 Nov 2025, 18:42

Type Values Removed Values Added
First Time Linux
Linux linux Kernel
CWE CWE-401
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ax25: Eliminar el autobind roto El enlace del socket AX25 mediante la función autobind genera pérdidas de memoria en ax25_connect() y también pérdidas de recuento de referencias en ax25_release(). Se detectó una fuga de memoria con kmemleak: == ... __sys_connect (net/socket.c:2064) __x64_sys_connect (net/socket.c:2067) do_syscall_64 (arch/x86/entry/common.c:52 arch/x86/entry/common.c:83) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) ===================================================================== Cuando se enlaza un socket, los recuentos de referencias se deben incrementar de la forma en que se hace en ax25_bind() y ax25_setsockopt() (SO_BINDTODEVICE). En caso de enlace automático, los recuentos de referencias no se incrementan. Este error provoca el siguiente problema reportado por Syzkaller: == ... ADVERTENCIA: CPU: 0 PID: 5317 en lib/refcount.c:31 refcount_warn_saturate+0xfa/0x1d0 lib/refcount.c:31 Módulos vinculados: CPU: 0 UID: 0 PID: 5317 Comm: syz-executor318 No contaminado 6.14.0-rc4-syzkaller-00278-gece144f151ac #0 Nombre del hardware: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 01/04/2014 RIP: 0010:refcount_warn_saturate+0xfa/0x1d0 lib/refcount.c:31 ... Rastreo de llamadas: __refcount_dec include/linux/refcount.h:336 [en línea] refcount_dec include/linux/refcount.h:351 [en línea] ref_tracker_free+0x6af/0x7e0 lib/ref_tracker.c:236 netdev_tracker_free include/linux/netdevice.h:4302 [en línea] netdev_put include/linux/netdevice.h:4319 [en línea] ax25_release+0x368/0x960 net/ax25/af_ax25.c:1080 __sock_release net/socket.c:647 [en línea] sock_close+0xbc/0x240 net/socket.c:1398 __fput+0x3e9/0x9f0 fs/file_table.c:464 __do_sys_close fs/open.c:1580 [en línea] __se_sys_close fs/open.c:1565 [en línea] __x64_sys_close+0x7f/0x110 fs/open.c:1565 do_syscall_x64 arch/x86/entry/common.c:52 [en línea] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f ... ===================================================================== Considerando los problemas anteriores y los comentarios que se dejaron en el código que dicen: "check Si podemos eliminar esta función, está defectuosa."; "La vinculación automática en este caso puede o no funcionar."; - Es mejor eliminar esta función por completo que corregirla, ya que está defectuosa y provoca diversos errores de memoria. Ahora, llamar a connect() sin vincular primero el socket generará un error (-EINVAL). El software de espacio de usuario que depende de la función de vinculación automática podría fallar. Sin embargo, esta función no parece ser muy utilizada con este controlador específico, ya que no era fiable en ningún momento y, de todos modos, ya está defectuosa. Por ejemplo, los paquetes ax25-tools y ax25-apps para distribuciones populares no utilizan la función de vinculación automática para AF_AX25. Encontrado por el Centro de Verificación de Linux (linuxtesting.org) con Syzkaller.
References () https://git.kernel.org/stable/c/2f6efbabceb6b2914ee9bafb86d9a51feae9cce8 - () https://git.kernel.org/stable/c/2f6efbabceb6b2914ee9bafb86d9a51feae9cce8 - Patch
References () https://git.kernel.org/stable/c/61203fdd3e35519db9a98b6ff8983c620ffc4696 - () https://git.kernel.org/stable/c/61203fdd3e35519db9a98b6ff8983c620ffc4696 - Patch
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 5.5
CPE cpe:2.3:o:linux:linux_kernel:2.6.12:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.12:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.12:-:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.12:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.12:rc5:*:*:*:*:*:*

16 Apr 2025, 15:16

Type Values Removed Values Added
New CVE

Information

Published : 2025-04-16 15:16

Updated : 2025-11-03 18:42


NVD link : CVE-2025-22109

Mitre link : CVE-2025-22109

CVE.ORG link : CVE-2025-22109


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-401

Missing Release of Memory after Effective Lifetime