5.5medium
mm/vmalloc, mm/kasan: respect gfp mask in kasan_populate_vmalloc()
- Severity
- 5.5medium CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 0.16% (higher than 5% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: mm/vmalloc, mm/kasan: respect gfp mask in kasan_populate_vmalloc() kasan_populate_vmalloc() and its helpers ignore the caller's gfp_mask and always allocate memory using the hardcoded GFP_KERNEL flag. This makes them inconsistent with vmalloc(), which was recently extended to support GFP_NOFS and GFP_NOIO allocations. Page table allocations performed during shadow population also ignore the external gfp_mask. To preserve the intended semantics of GFP_NOFS and GFP_NOIO, wrap the apply_to_page_range() calls into the appropriate memalloc scope. xfs calls vmalloc with GFP_NOFS, so this bug could lead to deadlock. There was a report here https://lkml.kernel.org/r/686ea951.050a0220.385921.0016.GAE@google.com This patch: - Extends kasan_populate_vmalloc() and helpers to take gfp_mask; - Passes gfp_mask down to alloc_pages_bulk() and __get_free_page(); - Enforces GFP_NOFS/NOIO semantics with memalloc_*_save()/restore() around apply_to_page_range(); - Updates vmalloc.c and percpu allocator call sites accordingly.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 451769ebb7e792c3404db53b3c2a422990de654e before c136f2e4f2edd58a62a3425d4dd373d82834d1f9, from 451769ebb7e792c3404db53b3c2a422990de654e before 9598c83a50a5f9d57fd0c12fc08d9425c1ce9537, from 451769ebb7e792c3404db53b3c2a422990de654e before aa1b4b7a1b92743297f9da741424df4703a8e11b, from 451769ebb7e792c3404db53b3c2a422990de654e before 33b95d90427cb4babf32059e323a6d0c027610fe, from 451769ebb7e792c3404db53b3c2a422990de654e before 79357cd06d41d0f5a11b17d7c86176e395d10ef2, 5.17 Not affected: before 5.17, from 6.1.191 up to 6.1.*, from 6.6.160 up to 6.6.*, from 6.12.114 up to 6.12.*, from 6.16.8 up to 6.16.*, from 6.17 up to * | CVE List |
| linux linux_kernel | from 5.17 before 6.16.8, 6.17 | NVD |
All scores
| CISA-ADP | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
In the Linux kernel, the following vulnerability has been resolved: mm/vmalloc, mm/kasan: respect gfp mask in kasan_populate_vmalloc() kasan_populate_vmalloc() and its helpers ignore the caller's gfp_mask and always allocate memory using the hardcoded GFP_KERNEL flag. This makes them inconsistent with vmalloc(), which was recently extended to support GFP_NOFS and GFP_NOIO allocations. Page table allocations performed during shadow population also ignore the external gfp_mask. To preserve the intended semantics of GFP_NOFS and GFP_NOIO, wrap the apply_to_page_range() calls into the appropriate memalloc scope. xfs calls vmalloc with GFP_NOFS, so this bug could lead to deadlock. There was a report here https://lkml.kernel.org/r/686ea951.050a0220.385921.0016.GAE@google.com This patch: - Extends kasan_populate_vmalloc() and helpers to take gfp_mask; - Passes gfp_mask down to alloc_pages_bulk() and __get_free_page(); - Enforces GFP_NOFS/NOIO semantics with memalloc_*_save()/restore() around apply_to_page_range(); - Updates vmalloc.c and percpu allocator call sites accordingly.
NVD (es)
En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: mm/vmalloc, mm/kasan: respetar la máscara gfp en kasan_populate_vmalloc() kasan_populate_vmalloc() y sus funciones auxiliares ignoran la gfp_mask del llamador y siempre asignan memoria utilizando la bandera GFP_KERNEL codificada. Esto los hace inconsistentes con vmalloc(), que fue extendida recientemente para soportar asignaciones GFP_NOFS y GFP_NOIO. Las asignaciones de tablas de páginas realizadas durante la población de sombra también ignoran la gfp_mask externa. Para preservar la semántica prevista de GFP_NOFS y GFP_NOIO, envuelva las llamadas a apply_to_page_range() dentro del ámbito memalloc apropiado. xfs llama a vmalloc con GFP_NOFS, por lo que este error podría llevar a un interbloqueo. Hubo un informe aquí https://lkml.kernel.org/r/686ea951.050a0220.385921.0016.GAE@google.com Este parche: - Extiende kasan_populate_vmalloc() y sus funciones auxiliares para que acepten gfp_mask; - Pasa gfp_mask a alloc_pages_bulk() y __get_free_page(); - Aplica la semántica de GFP_NOFS/NOIO con memalloc_*_save()/restore() alrededor de apply_to_page_range(); - Actualiza los sitios de llamada del asignador vmalloc.c y percpu en consecuencia.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-39910 changed 2026-10-30 | CVE Terms of Use |
| NVD | CVE-2025-39910 changed 2026-10-30 | Public domain |