CVE-2024-41013

In the Linux kernel, the following vulnerability has been resolved: xfs: don't walk off the end of a directory data block This adds sanity checks for xfs_dir2_data_unused and xfs_dir2_data_entry to make sure don't stray beyond valid memory region. Before patching, the loop simply checks that the start offset of the dup and dep is within the range. So in a crafted image, if last entry is xfs_dir2_data_unused, we can change dup->length to dup->length-1 and leave 1 byte of space. In the next traversal, this space will be considered as dup or dep. We may encounter an out of bound read when accessing the fixed members. In the patch, we make sure that the remaining bytes large enough to hold an unused entry before accessing xfs_dir2_data_unused and xfs_dir2_data_unused is XFS_DIR2_DATA_ALIGN byte aligned. We also make sure that the remaining bytes large enough to hold a dirent with a single-byte name before accessing xfs_dir2_data_entry.
CVSS

No CVSS.

Configurations

No configuration.

History

29 Jul 2024, 14:12

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, se resolvió la siguiente vulnerabilidad: xfs: no salga del final de un bloque de datos de directorio. Esto agrega controles de sanitización para xfs_dir2_data_unused y xfs_dir2_data_entry para asegurarse de que no se desvíen más allá de la región de memoria válida. Antes de parchear, el bucle simplemente verifica que el desplazamiento inicial de dup y dep esté dentro del rango. Entonces, en una imagen manipulada, si la última entrada es xfs_dir2_data_unused, podemos cambiar dup->length a dup->length-1 y dejar 1 byte de espacio. En el próximo recorrido, este espacio se considerará dup o dep. Es posible que nos encontremos con una lectura fuera de los límites al acceder a los miembros fijos. En el parche, nos aseguramos de que los bytes restantes sean lo suficientemente grandes como para contener una entrada no utilizada antes de acceder a xfs_dir2_data_unused y xfs_dir2_data_unused estén alineados con los bytes XFS_DIR2_DATA_ALIGN. También nos aseguramos de que los bytes restantes sean lo suficientemente grandes como para contener un directorio con un nombre de un solo byte antes de acceder a xfs_dir2_data_entry.

29 Jul 2024, 07:15

Type Values Removed Values Added
New CVE

Information

Published : 2024-07-29 07:15

Updated : 2024-07-29 14:12


NVD link : CVE-2024-41013

Mitre link : CVE-2024-41013

CVE.ORG link : CVE-2024-41013


JSON object : View

Products Affected

No product.

CWE

No CWE.