Descripción
En el Linux kernel se ha resuelto la siguiente vulnerabilidad: smb: client: reject a tree connect response whose byte count is too small CIFSTCon() acota su strnlen() sobre el área de bytes con el ByteCount del servidor menos dos, lo que para ByteCount 0 o 1 resulta negativo como int y se convierte en un size_t enorme. La resta posterior hace que el __u16 bytes_left dé la vuelta, y es este valor el que acota cifs_strndup_from_utf16(): un límite de hasta 65535 frente a un objeto cifs_req_poolp de ~16 KB excede el final del objeto slab, y los bytes llegan al espacio de usuario a través de tcon->nativeFileSystem en /proc/fs/cifs/DebugData. Se rechaza un área de bytes demasiado pequeña para lo que consume el analizador. Dos bytes es lo mínimo que puede consumir, y ninguna respuesta conforme lleva menos. El nuevo punto de traza es la entrada 129 de smb_eio_trace, que __mode(byte) no puede representar, por lo que ese atributo se elimina junto con ello.
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: cc20c031bb067eb3280a1c4b5c42295093e24863 y anteriores a bb99866cb1d3d5e8201200a8692fd8da3106a8fd · cc20c031bb067eb3280a1c4b5c42295093e24863 y anteriores a d837645a719151ed392d4d9cab4571c2753dab12 · cc20c031bb067eb3280a1c4b5c42295093e24863 y anteriores a 2ae219762ebac929bf6ab3473681f10ed566af08 · cc20c031bb067eb3280a1c4b5c42295093e24863 y anteriores a 3be89e8039a85fa3b6cd5f9dcc4c1459eb356c2d · cc20c031bb067eb3280a1c4b5c42295093e24863 y anteriores a 411e484fe71a7f1028de617447edad9cb6d9d68a · cc20c031bb067eb3280a1c4b5c42295093e24863 y anteriores a 65deb18359341141d37dc86fc7853511be3c87a7
- Linux Afectadas: 2.6.30 No afectadas: 6.1.191 · 6.6.160 · 6.12.114 · 6.18.51 · 7.2.4 · 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/bb99866cb1d3d5e8201200a8692fd8da3106a8fd
- Referencia en git.kernel.orggit.kernel.org/stable/c/d837645a719151ed392d4d9cab4571c2753dab12
- Referencia en git.kernel.orggit.kernel.org/stable/c/2ae219762ebac929bf6ab3473681f10ed566af08
- Referencia en git.kernel.orggit.kernel.org/stable/c/3be89e8039a85fa3b6cd5f9dcc4c1459eb356c2d
- Referencia en git.kernel.orggit.kernel.org/stable/c/411e484fe71a7f1028de617447edad9cb6d9d68a
- Referencia en git.kernel.orggit.kernel.org/stable/c/65deb18359341141d37dc86fc7853511be3c87a7
Ver el texto original en inglés (CVE.org)
smb: client: reject a tree connect response whose byte count is too small
In the Linux kernel, the following vulnerability has been resolved: smb: client: reject a tree connect response whose byte count is too small CIFSTCon() bounds its strnlen() over the byte area with the server's ByteCount minus two, which for ByteCount 0 or 1 goes negative as an int and converts to a huge size_t. The later subtraction wraps the __u16 bytes_left, and that is what bounds cifs_strndup_from_utf16(): a bound of up to 65535 against a ~16 KB cifs_req_poolp object runs off the end of the slab object, and the bytes reach userspace through tcon->nativeFileSystem in /proc/fs/cifs/DebugData. Reject a byte area too small for what the parser consumes. Two bytes is the least it can consume, and no conformant response carries fewer. The new trace point is the 129th smb_eio_trace entry, which __mode(byte) cannot represent, so the attribute goes with it.