Descripción
En el kernel de Linux, se resolvió la siguiente vulnerabilidad: Drivers: hv: vmbus: Bounds check the shared ring buffer indices En una VM CoCo, el host no es confiable. Dado que los índices de lectura y escritura del búfer circular de VMBus residen en memoria compartida, el invitado debe tratar ambos como potencialmente maliciosos. hv_ringbuffer_write() copia en el búfer circular en write_index sin verificación de límites, por lo que el host puede hacer que el invitado escriba datos de paquetes en cualquier desplazamiento de hasta 4 GiB más allá del inicio del búfer circular. read_index también importa: el espacio disponible derivado de ambos índices es el único límite de cuánto se copia, y un índice fuera de rango puede hacerlo mucho mayor que el búfer circular. La corrección consiste en validar ambos índices antes de usarlos y utilizar la copia validada en lugar de volver a acceder a ellos. Para índices no válidos, hv_ringbuffer_write() registra el evento y devuelve -EIO. En este parche queda sin verificar una nueva lectura de write_index: hv_get_ring_bufferindices() la obtiene otra vez para el trailer prev_indices. El valor solo se devuelve al host y no se usa como desplazamiento ni longitud para indexar. Como no se trata de un problema de seguridad, se aborda más adelante en la serie. Escribir directamente la aritmética de bytes disponibles mantiene la corrección libre de requisitos previos; un parche posterior la refactoriza en una función auxiliar.
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: 3e7ee4902fe6996048f03433dd111426db3cfa92 y anteriores a cdb9126a79b608b4331dfdc03beb05be8d2563be · 3e7ee4902fe6996048f03433dd111426db3cfa92 y anteriores a f204bb7c5d10482067e095af567c391bc88ecb44 · 3e7ee4902fe6996048f03433dd111426db3cfa92 y anteriores a 1611ce4dc6cbace75f27db6a559af8d391a06118 · 3e7ee4902fe6996048f03433dd111426db3cfa92 y anteriores a 1d287c17cc5bfd6386fe0770999be410b248d021
- Linux Afectadas: 2.6.32 No afectadas: 6.12.117 · 6.18.61 · 7.3.2 · 7.4-rc1
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/cdb9126a79b608b4331dfdc03beb05be8d2563be
- Referencia en git.kernel.orggit.kernel.org/stable/c/f204bb7c5d10482067e095af567c391bc88ecb44
- Referencia en git.kernel.orggit.kernel.org/stable/c/1611ce4dc6cbace75f27db6a559af8d391a06118
- Referencia en git.kernel.orggit.kernel.org/stable/c/1d287c17cc5bfd6386fe0770999be410b248d021
Ver el texto original en inglés (CVE.org)
Drivers: hv: vmbus: Bounds check the shared ring buffer indices
In the Linux kernel, the following vulnerability has been resolved: Drivers: hv: vmbus: Bounds check the shared ring buffer indices In a CoCo VM the host is untrusted. Since the VMBus ring buffer read and write indices live in shared memory, the guest has to treat both as potentially malicious. hv_ringbuffer_write() copies into the ring at write_index with no bounds checking, so the host can make the guest write packet data at any offset up to 4 GiB past the start of the ring buffer. read_index matters too: the available space derived from both indices is the only bound on how much is copied, and an out-of-range index can make it far larger than the ring. The fix is to validate both indices before use and to use the validated snapshot instead of re-accessing. For invalid indices, hv_ringbuffer_write() logs and returns -EIO. One re-read of write_index is left unchecked in this patch: hv_get_ring_bufferindices() fetches it again for the prev_indices trailer. The value is only returned to the host and is not used as an offset or length for indexing. Since this is not a security issue, it is addressed later in the series. Open-coding the bytes available arithmetic keeps the fix free of prerequisites; a later patch refactors it into a helper function.