CVE-2024-42293

In the Linux kernel, the following vulnerability has been resolved: arm64: mm: Fix lockless walks with static and dynamic page-table folding Lina reports random oopsen originating from the fast GUP code when 16K pages are used with 4-level page-tables, the fourth level being folded at runtime due to lack of LPA2. In this configuration, the generic implementation of p4d_offset_lockless() will return a 'p4d_t *' corresponding to the 'pgd_t' allocated on the stack of the caller, gup_fast_pgd_range(). This is normally fine, but when the fourth level of page-table is folded at runtime, pud_offset_lockless() will offset from the address of the 'p4d_t' to calculate the address of the PUD in the same page-table page. This results in a stray stack read when the 'p4d_t' has been allocated on the stack and can send the walker into the weeds. Fix the problem by providing our own definition of p4d_offset_lockless() when CONFIG_PGTABLE_LEVELS <= 4 which returns the real page-table pointer rather than the address of the local stack variable.
CVSS

No CVSS.

Configurations

No configuration.

History

19 Aug 2024, 12:59

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: arm64: mm: corrige recorridos sin bloqueo con plegado de tablas de páginas estáticas y dinámicas. Lina informa oopsen aleatorios que se originan en el código GUP rápido cuando se utilizan páginas de 16 KB con tablas de páginas de 4 niveles. el cuarto nivel se pliega en tiempo de ejecución debido a la falta de LPA2. En esta configuración, la implementación genérica de p4d_offset_lockless() devolverá un 'p4d_t *' correspondiente al 'pgd_t' asignado en la pila de la persona que llama, gup_fast_pgd_range(). Esto normalmente está bien, pero cuando el cuarto nivel de la tabla de páginas se pliega en tiempo de ejecución, pud_offset_lockless() se desplazará de la dirección de 'p4d_t' para calcular la dirección del PUD en la misma página de la tabla de páginas. Esto da como resultado una lectura de pila perdida cuando el 'p4d_t' se ha asignado en la pila y puede enviar al caminante hacia la maleza. Solucione el problema proporcionando nuestra propia definición de p4d_offset_lockless() cuando CONFIG_PGTABLE_LEVELS &lt;= 4, que devuelve el puntero de la tabla de páginas real en lugar de la dirección de la variable de pila local.

17 Aug 2024, 09:15

Type Values Removed Values Added
New CVE

Information

Published : 2024-08-17 09:15

Updated : 2024-08-19 12:59


NVD link : CVE-2024-42293

Mitre link : CVE-2024-42293

CVE.ORG link : CVE-2024-42293


JSON object : View

Products Affected

No product.

CWE

No CWE.