Descripción
En el kernel de Linux se resolvió la siguiente vulnerabilidad: nvmet: corrección de una lectura fuera de límites en el heap en nvmet_auth_negotiate() nvmet_execute_auth_send() asigna el búfer de mensajes DH-HMAC-CHAP con la longitud de transferencia (tl) proporcionada por el host y lo entrega a nvmet_auth_negotiate() sin pasarle tl. Luego, nvmet_auth_negotiate() lee el encabezado de negociación y, para cada uno de los halen identificadores de hash y dhlen identificadores de grupo DH, accede por índice al arreglo fijo idlist[60] (hashes en idlist[0..halen), grupos en idlist[30..]). Ni la longitud de transferencia ni halen/dhlen se validan. Un host malicioso o no conforme puede informar un tl menor que la estructura de negociación, o un halen/dhlen mayor que el arreglo (ambos son u8, hasta 255), lo que hace que los bucles lean más allá del final del búfer asignado (lectura fuera de límites en el heap). La función hermana nvmet_auth_reply() ya valida tl frente al tamaño de la estructura; la ruta de negociación no lo hacía. Se pasa tl a nvmet_auth_negotiate(), se rechaza un tl que no cubra los datos de negociación más un descriptor de protocolo completo y se rechaza un halen/dhlen mayor que NVME_AUTH_DHCHAP_MAX_DH_IDS.
Qué hacer
Revisa si usas el producto afectado y en qué versión, y aplica la actualización o la mitigación que indique el aviso del fabricante. CISA no ha confirmado que se esté explotando; si eso cambia, esta ficha pasa a «explotada» y te avisamos en el boletín.
Versiones afectadas
- Linux Afectadas: db1312dd95488b5e6ff362ff66fcf953a46b1821 y anteriores a 89ff11b72f38976f3b5aea23a5228ee05e277209 · db1312dd95488b5e6ff362ff66fcf953a46b1821 y anteriores a aaac783950b17c57df9b6f7344747cacb1a407ed · db1312dd95488b5e6ff362ff66fcf953a46b1821 y anteriores a c38a8186326799957d293d370136c128cd113916 · db1312dd95488b5e6ff362ff66fcf953a46b1821 y anteriores a 7b81e4d2230e3d2d372c826180c4ef0efc244f31 · db1312dd95488b5e6ff362ff66fcf953a46b1821 y anteriores a 5bb96cc218835769ab74ec7f3ea2bf81fbffe955
- Linux Afectadas: 6.0 No afectadas: 6.6.157 · 6.12.110 · 6.18.52 · 7.2.6 · 7.3
Según el registro de la vulnerabilidad en CVE.org, tal como lo publicó el fabricante. Confirma tu versión exacta en el aviso del fabricante.
Referencias
- Referencia en git.kernel.orggit.kernel.org/stable/c/89ff11b72f38976f3b5aea23a5228ee05e277209
- Referencia en git.kernel.orggit.kernel.org/stable/c/aaac783950b17c57df9b6f7344747cacb1a407ed
- Referencia en git.kernel.orggit.kernel.org/stable/c/c38a8186326799957d293d370136c128cd113916
- Referencia en git.kernel.orggit.kernel.org/stable/c/7b81e4d2230e3d2d372c826180c4ef0efc244f31
- Referencia en git.kernel.orggit.kernel.org/stable/c/5bb96cc218835769ab74ec7f3ea2bf81fbffe955
Ver el texto original en inglés (CVE.org)
nvmet: fix heap out-of-bounds read in nvmet_auth_negotiate()
In the Linux kernel, the following vulnerability has been resolved: nvmet: fix heap out-of-bounds read in nvmet_auth_negotiate() nvmet_execute_auth_send() allocates the DH-HMAC-CHAP message buffer with the host-supplied transfer length (tl) and hands it to nvmet_auth_negotiate() without passing tl along. nvmet_auth_negotiate() then reads the negotiate header and, for each of the halen hash identifiers and dhlen DH group identifiers, indexes into the fixed idlist[60] array (hashes at idlist[0..halen), groups at idlist[30..]). Neither the transfer length nor halen/dhlen is validated. A malicious or non-conformant host can report a tl smaller than the negotiate structure, or a halen/dhlen larger than the array (both are u8, up to 255), making the loops read past the end of the allocated buffer (heap out-of-bounds read). The sibling nvmet_auth_reply() already validates tl against the structure size; the negotiate path did not. Pass tl into nvmet_auth_negotiate(), reject a tl that does not cover the negotiate data plus one full protocol descriptor, and reject halen/dhlen larger than NVME_AUTH_DHCHAP_MAX_DH_IDS.