VULNERABILIDAD
CVE-2026-19669 Desbordamiento de pila del kernel en verificadores de syscall de fuel gauge
Los verificadores de syscall en modo usuario z_vrfy_fuel_gauge_get_props() y z_vrfy_fuel_gauge_set_props() declaran arrays de longitud variable dimensionados por el argumento len sin validar, antes de cualquier comprobación de permisos. Cualquier hilo en modo usuario con CONFIG_USERSPACE puede invocar estas syscalls con un len grande y desbordar la pila del supervisor.
Alerta de Nureq Monitor
Detectada 11 OCT · 16:24
CVSS 3.1
7.8ALTAPROBABILIDAD DE EXPLOTACIÓN (EPSS)
0,1 % PERCENTIL 2
EXPLOTACIÓN ACTIVA
No confirmada
EXPLOIT PÚBLICO
No conocido
Qué es CVE-2026-19669
Los verificadores de syscall en modo usuario z_vrfy_fuel_gauge_get_props() y z_vrfy_fuel_gauge_set_props() declaran arrays de longitud variable dimensionados por el argumento len sin validar, antes de cualquier comprobación de permisos. Cualquier hilo en modo usuario con CONFIG_USERSPACE puede invocar estas syscalls con un len grande y desbordar la pila del supervisor.
Productos y versiones afectadas
zephyrproject zephyr
Qué hacer
- Verificá si usás zephyr y en qué versión: el rango afectado figura arriba.
- Actualizá a la versión corregida que indique el fabricante en su aviso (ver referencias) o aplicá la mitigación que publique.
- Revisá registros y accesos de los sistemas expuestos para descartar que se haya aprovechado antes de corregir.
Calculadora CVSS
CVSS 3.1 · 7.8 ALTA
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- VECTOR DE ATAQUE (AV)
- Local
- COMPLEJIDAD DEL ATAQUE (AC)
- Baja
- PRIVILEGIOS REQUERIDOS (PR)
- Bajos
- INTERACCIÓN DEL USUARIO (UI)
- Ninguna
- ALCANCE (S)
- Sin cambio
- CONFIDENCIALIDAD (C)
- Alta
- INTEGRIDAD (I)
- Alta
- DISPONIBILIDAD (A)
- Alta
Abrir la calculadora completa →
Descripción original
The user-mode syscall verifiers z_vrfy_fuel_gauge_get_props() and z_vrfy_fuel_gauge_set_props() in drivers/fuel_gauge/fuel_gauge_syscall_handlers.c declared two variable-length arrays, union fuel_gauge_prop_val k_vals[len] and fuel_gauge_prop_t k_props[len], sized directly by the caller-supplied len argument. len is an unvalidated size_t taken straight from the syscall ABI, and the VLAs were allocated before any check at all — including before the K_SYSCALL_DRIVER_FUEL_GAUGE() object-permission check. The subsequent k_usermode_from_copy() calls validated only that the user source buffer was readable; the kernel destination was never bounds-checked, since it was sized by the same attacker-chosen len.
Any thread running in user mode with CONFIG_USERSPACE enabled can invoke fuel_gauge_get_props() or fuel_gauge_set_props() with a large len. This first displaces the supervisor stack pointer by an arbitrary attacker-chosen amount — Zephyr does not build with stack-clash probing, so the displacement itself does not fault, and the nested calls made by the verifier then write frames below the privileged stack. If the caller has been granted access to a fuel-gauge device object, the memcpy inside k_usermode_from_copy() additionally writes len * sizeof(union fuel_gauge_prop_val) bytes of fully attacker-controlled data starting well below the stack base. CONFIG_PRIVILEGED_STACK_SIZE defaults to 1024 bytes, so a len of roughly 170 already exhausts it.
The result is an out-of-bounds write in supervisor mode with attacker-controlled length and, on the permitted path, attacker-controlled content — a break out of the user-mode sandbox into kernel memory, leading to kernel code execution or a system crash. A stack guard region does not contain it, because the copy begins below the guard and walks upward, corrupting unprotected memory before the guard is reached. The fix removes the kernel-side copies entirely and validates the caller's arrays in place with K_SYSCALL_MEMORY_ARRAY_READ() / K_SYSCALL_MEMORY_ARRAY_WRITE(), which also handle the len * size multiplication overflow; this is safe because neither fuel_gauge_prop_t nor union fuel_gauge_prop_val contains embedded pointers.
Referencias
- github.com/zephyrproject-rtos/zephyr/commit/0d65ce46dda0626164503c50f37e6e1f59d310a9PATCH
- github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-6ghg-cmrw-8gw5
Historial de la alerta
- VULNERABILIDAD Nueva vulnerabilidad detectada.
CÓMO SE HIZOResumen traducido automáticamente al español a partir de la descripción original. Ante dudas, la descripción original y las referencias del fabricante son la fuente de verdad. Cómo funciona.