Instituto Nacional de ciberseguridad. Sección Incibe
Instituto Nacional de Ciberseguridad. Sección INCIBE-CERT

Vulnerabilidad en kernel de Linux (CVE-2022-49551)

Gravedad CVSS v3.1:
ALTA
Tipo:
CWE-125 Lectura fuera de límites
Fecha de publicación:
26/02/2025
Última modificación:
10/03/2025

Descripción

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: usb: isp1760: Fix out-of-bounds array access Running the driver through kasan gives an interesting splat: BUG: KASAN: global-out-of-bounds in isp1760_register+0x180/0x70c Read of size 20 at addr f1db2e64 by task swapper/0/1 (...) isp1760_register from isp1760_plat_probe+0x1d8/0x220 (...) This happens because the loop reading the regmap fields for the different ISP1760 variants look like this: for (i = 0; i < HC_FIELD_MAX; i++) { ... } Meaning it expects the arrays to be at least HC_FIELD_MAX - 1 long. However the arrays isp1760_hc_reg_fields[], isp1763_hc_reg_fields[], isp1763_hc_volatile_ranges[] and isp1763_dc_volatile_ranges[] se dimensionan dinámicamente durante la compilación. Solucione esto colocando una asignación vacía al miembro de la matriz [HC_FIELD_MAX] y [DC_FIELD_MAX] al final de cada matriz. Esto hará que la matriz tenga un miembro más de lo que necesita ser, pero evita el riesgo de sobrescribir lo que esté dentro de [HC_FIELD_MAX - 1] y es simple e intuitivo de leer. También agregue comentarios que expliquen lo que está sucediendo.

Productos y versiones vulnerables

CPE Desde Hasta
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.14 (incluyendo) 5.15.46 (excluyendo)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.16 (incluyendo) 5.17.14 (excluyendo)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.18 (incluyendo) 5.18.3 (excluyendo)