CVE-2026-19669
Los verificadores de llamada al sistema en modo usuario z_vrfy_fuel_gauge_get_props() y z_vrfy_fuel_gauge_set_props() en drivers/fuel_gauge/fuel_gauge_syscall_handlers.c declaraban dos matrices de longitud variable, union fuel_gauge_prop_val k_vals[len] y fuel_gauge_prop_t k_props[len], dimensionadas directamente por el argumento len suministrado por el llamador. len es un size_t sin validar tomado directamente de la ABI de llamada al sistema, y las VLA se asignaban antes de cualquier comprobación — incluso antes de la comprobación de permisos del objeto K_SYSCALL_DRIVER_FUEL_GAUGE().
Leer descripción completaMostrar menos
Las llamadas posteriores a k_usermode_from_copy() validaban solo que el búfer de origen del usuario era legible; el destino del kernel nunca fue comprobado en límites, ya que fue dimensionado por el mismo len elegido por el atacante.
Cualquier hilo que se ejecute en modo usuario con CONFIG_USERSPACE habilitado puede invocar fuel_gauge_get_props() o fuel_gauge_set_props() con un len grande. Esto primero desplaza el puntero de pila del supervisor una cantidad arbitraria elegida por el atacante — Zephyr no se compila con sondeo de choque de pila, por lo que el desplazamiento en sí no genera un fallo, y las llamadas anidadas realizadas por el verificador escriben entonces marcos por debajo de la pila privilegiada. Si al llamador se le ha otorgado acceso a un objeto de dispositivo fuel-gauge, la memcpy dentro de k_usermode_from_copy() además escribe len * sizeof(union fuel_gauge_prop_val) bytes de datos completamente controlados por el atacante comenzando bien por debajo de la base de la pila. CONFIG_PRIVILEGED_STACK_SIZE por defecto es 1024 bytes, por lo que un len de aproximadamente 170 ya lo agota.
El resultado es una escritura fuera de límites en modo supervisor con longitud controlada por el atacante y, en la ruta permitida, contenido controlado por el atacante — una ruptura del aislamiento del modo usuario en la memoria del kernel, conduciendo a la ejecución de código del kernel o a un bloqueo del sistema. Una región de guardián de pila no lo contiene, porque la copia comienza por debajo del guardián y camina hacia arriba, corrompiendo memoria no protegida antes de que se alcance el guardián. La corrección elimina las copias del lado del kernel por completo y valida las matrices del llamador en su lugar con K_SYSCALL_MEMORY_ARRAY_READ() / K_SYSCALL_MEMORY_ARRAY_WRITE(), que también manejan el desbordamiento de multiplicación len * size; esto es seguro porque ni fuel_gauge_prop_t ni union fuel_gauge_prop_val contienen punteros incrustados.
Traducción automática del texto original de NVD (en inglés).
CVSS
- Puntuación base
- 7.8
- Versión
- 3.1
- Vector
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Probabilidad de explotación (EPSS)
- Probabilidad de explotación en los próximos 30 días
- 0.12 %
- Percentil entre todas las CVEs puntuadas
- 2
- Fecha de la puntuación
- 21/10/2026
EPSS (Exploit Prediction Scoring System, de FIRST) estima la probabilidad de que una vulnerabilidad sea explotada en 30 días. Complementa a CVSS (impacto) y a CISA KEV (explotación confirmada).
Técnicas ATT&CK
Cómo se explota esta vulnerabilidad y qué consigue el atacante, en el lenguaje de MITRE ATT&CK.
- Explotación
T1068Exploitation for Privilege Escalationprivilege escalation95 % - Impacto principal
T1059Command and Scripting Interpreterexecution90 % - Impacto secundario
T1499.004Application or System Exploitationimpact75 %
AV:L/PR:L: acceso local con privilegios limitados. Stack overflow controlado por atacante en modo supervisor permite ejecutar código kernel (T1059) o crash (T1499.004). La vulnerabilidad permite escalar desde userspace a kernel mode sin validación de len.
Inferido por nuestro agente de análisis a partir de la descripción oficial, el vector CVSS y la CWE, y comprobado por un supervisor. Puede contener errores.
Mitigaciones ATT&CK que cubren estas técnicas
Tecnologías afectadas (1)
⚠ Inferidas por IA a partir de la descripción — NVD aún no ha analizado esta CVE; no son CPE verificados.
CWE
- CWE-787
Referencias
JSON original (NVD)
Mostrar
{
"id": "CVE-2026-19669",
"cveTags": [],
"metrics": {
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"id": "CVE-2026-19669",
"role": "CISA Coordinator",
"options": [
{
"exploitation": "none"
},
{
"automatable": "no"
},
{
"technicalImpact": "total"
}
],
"version": "2.0.3",
"timestamp": "2026-10-15T17:57:39.407044Z"
}
}
],
"cvssMetricV31": [
{
"type": "Secondary",
"source": "vulnerabilities@zephyrproject.org",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 7.8,
"attackVector": "LOCAL",
"baseSeverity": "HIGH",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"integrityImpact": "HIGH",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"availabilityImpact": "HIGH",
"privilegesRequired": "LOW",
"confidentialityImpact": "HIGH"
},
"impactScore": 5.9,
"exploitabilityScore": 1.8
}
]
},
"affected": [
{
"source": "vulnerabilities@zephyrproject.org",
"affectedData": [
{
"vendor": "zephyrproject",
"product": "zephyr",
"versions": [
{
"status": "affected",
"version": "3.4.0",
"lessThan": "4.5.0",
"versionType": "semver"
}
],
"packageName": "zephyr",
"programFiles": [
"drivers/fuel_gauge/fuel_gauge_syscall_handlers.c"
],
"collectionURL": "https://github.com/zephyrproject-rtos/zephyr",
"defaultStatus": "unaffected",
"programRoutines": [
{
"name": "z_vrfy_fuel_gauge_get_props"
},
{
"name": "z_vrfy_fuel_gauge_set_props"
}
]
}
]
}
],
"published": "2026-10-11T18:16:58.563",
"references": [
{
"url": "https://github.com/zephyrproject-rtos/zephyr/commit/0d65ce46dda0626164503c50f37e6e1f59d310a9",
"source": "vulnerabilities@zephyrproject.org"
},
{
"url": "https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-6ghg-cmrw-8gw5",
"source": "vulnerabilities@zephyrproject.org"
}
],
"vulnStatus": "Awaiting Analysis",
"weaknesses": [
{
"type": "Secondary",
"source": "vulnerabilities@zephyrproject.org",
"description": [
{
"lang": "en",
"value": "CWE-787"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "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.\n\nAny 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.\n\nThe 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."
}
],
"lastModified": "2026-10-15T19:17:37.340",
"sourceIdentifier": "vulnerabilities@zephyrproject.org"
}