// For flags

CVE-2024-53113

mm: fix NULL pointer dereference in alloc_pages_bulk_noprof

Severity Score

"-"
*CVSS v-

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

In the Linux kernel, the following vulnerability has been resolved:

mm: fix NULL pointer dereference in alloc_pages_bulk_noprof

We triggered a NULL pointer dereference for ac.preferred_zoneref->zone in
alloc_pages_bulk_noprof() when the task is migrated between cpusets.

When cpuset is enabled, in prepare_alloc_pages(), ac->nodemask may be
&current->mems_allowed. when first_zones_zonelist() is called to find
preferred_zoneref, the ac->nodemask may be modified concurrently if the
task is migrated between different cpusets. Assuming we have 2 NUMA Node,
when traversing Node1 in ac->zonelist, the nodemask is 2, and when
traversing Node2 in ac->zonelist, the nodemask is 1. As a result, the
ac->preferred_zoneref points to NULL zone.

In alloc_pages_bulk_noprof(), for_each_zone_zonelist_nodemask() finds a
allowable zone and calls zonelist_node_idx(ac.preferred_zoneref), leading
to NULL pointer dereference.

__alloc_pages_noprof() fixes this issue by checking NULL pointer in commit
ea57485af8f4 ("mm, page_alloc: fix check for NULL preferred_zone") and
commit df76cee6bbeb ("mm, page_alloc: remove redundant checks from alloc
fastpath").

To fix it, check NULL pointer for preferred_zoneref->zone.

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: mm: corregir la desreferencia de puntero NULL en alloc_pages_bulk_noprof Activamos una desreferencia de puntero NULL para ac.preferred_zoneref->zone en alloc_pages_bulk_noprof() cuando la tarea se migra entre conjuntos de CPU. Cuando se habilita el conjunto de CPU, en prepare_alloc_pages(), ac->nodemask puede ser &current->mems_allowed. Cuando se llama a first_zones_zonelist() para encontrar preference_zoneref, ac->nodemask puede modificarse simultáneamente si la tarea se migra entre diferentes conjuntos de CPU. Suponiendo que tenemos 2 nodos NUMA, al recorrer el nodo 1 en ac->zonelist, la máscara de nodo es 2, y al recorrer el nodo 2 en ac->zonelist, la máscara de nodo es 1. Como resultado, ac->preferred_zoneref apunta a la zona NULL. En alloc_pages_bulk_noprof(), for_each_zone_zonelist_nodemask() encuentra una zona permitida y llama a zonelist_node_idx(ac.preferred_zoneref), lo que genera una desreferencia del puntero NULL. __alloc_pages_noprof() corrige este problema al verificar el puntero NULL en la confirmación ea57485af8f4 ("mm, page_alloc: corregir la verificación para la zona preferida NULL") y la confirmación df76cee6bbeb ("mm, page_alloc: eliminar las verificaciones redundantes de la ruta rápida de asignación"). Para solucionarlo, verifique el puntero NULL para la zona preferida->zone.

*Credits: N/A
CVSS Scores
Attack Vector
-
Attack Complexity
-
Privileges Required
-
User Interaction
-
Scope
-
Confidentiality
-
Integrity
-
Availability
-
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2024-11-19 CVE Reserved
  • 2024-12-02 CVE Published
  • 2024-12-02 CVE Updated
  • ---------- EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 5.13 < 6.1.119
Search vendor "Linux" for product "Linux Kernel" and version " >= 5.13 < 6.1.119"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 5.13 < 6.6.63
Search vendor "Linux" for product "Linux Kernel" and version " >= 5.13 < 6.6.63"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 5.13 < 6.11.10
Search vendor "Linux" for product "Linux Kernel" and version " >= 5.13 < 6.11.10"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 5.13 < 6.12
Search vendor "Linux" for product "Linux Kernel" and version " >= 5.13 < 6.12"
en
Affected