# CVE-2024-39474: mm/vmalloc: fix vmalloc which may return null if called with \_\_GFP\_NOFAIL

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.31% (percentile 16, 2026-11-26)
- **CWE:** CWE-770
- **Published:** 2024-07-05T06:55:05.178Z
- **Modified:** 2026-06-17T07:41:59.523Z

## Who should check

- Anyone running Linux \>= 9376130c390a76fac2788a5d6e1a149017b4ab50, \< 198a80833e3421d4c9820a4ae907120adf598c91; \>= 9376130c390a76fac2788a5d6e1a149017b4ab50, \< c55d3564ad25ce87ab7cc6af251f9574faebd8da; \>= 9376130c390a76fac2788a5d6e1a149017b4ab50, \< 758678b65164b2158fc1de411092191cb3c394d4; \>= 9376130c390a76fac2788a5d6e1a149017b4ab50, \< 8e0545c83d672750632f46e3f9ad95c48c91a0fc
- Anyone running Linux 5.17

## Description

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

mm/vmalloc: fix vmalloc which may return null if called with \_\_GFP\_NOFAIL

commit a421ef303008 ("mm: allow !GFP\_KERNEL allocations for kvmalloc")
includes support for \_\_GFP\_NOFAIL, but it presents a conflict with commit
dd544141b9eb ("vmalloc: back off when the current task is OOM-killed").  A
possible scenario is as follows:

process-a
\_\_vmalloc\_node\_range(GFP\_KERNEL \| \_\_GFP\_NOFAIL)
    \_\_vmalloc\_area\_node()
        vm\_area\_alloc\_pages()
		--\> oom-killer send SIGKILL to process-a
        if (fatal\_signal\_pending(current)) break;
--\> return NULL;

To fix this, do not check fatal\_signal\_pending() in vm\_area\_alloc\_pages()
if \_\_GFP\_NOFAIL set.

This issue occurred during OPLUS KASAN TEST. Below is part of the log
-\> oom-killer sends signal to process
\[65731.222840\] \[ T1308\] oom-kill:constraint=CONSTRAINT\_NONE,nodemask=(null),cpuset=/,mems\_allowed=0,global\_oom,task\_memcg=/apps/uid\_10198,task=gs.intelligence,pid=32454,uid=10198

\[65731.259685\] \[T32454\] Call trace:
\[65731.259698\] \[T32454\]  dump\_backtrace+0xf4/0x118
\[65731.259734\] \[T32454\]  show\_stack+0x18/0x24
\[65731.259756\] \[T32454\]  dump\_stack\_lvl+0x60/0x7c
\[65731.259781\] \[T32454\]  dump\_stack+0x18/0x38
\[65731.259800\] \[T32454\]  mrdump\_common\_die+0x250/0x39c \[mrdump\]
\[65731.259936\] \[T32454\]  ipanic\_die+0x20/0x34 \[mrdump\]
\[65731.260019\] \[T32454\]  atomic\_notifier\_call\_chain+0xb4/0xfc
\[65731.260047\] \[T32454\]  notify\_die+0x114/0x198
\[65731.260073\] \[T32454\]  die+0xf4/0x5b4
\[65731.260098\] \[T32454\]  die\_kernel\_fault+0x80/0x98
\[65731.260124\] \[T32454\]  \_\_do\_kernel\_fault+0x160/0x2a8
\[65731.260146\] \[T32454\]  do\_bad\_area+0x68/0x148
\[65731.260174\] \[T32454\]  do\_mem\_abort+0x151c/0x1b34
\[65731.260204\] \[T32454\]  el1\_abort+0x3c/0x5c
\[65731.260227\] \[T32454\]  el1h\_64\_sync\_handler+0x54/0x90
\[65731.260248\] \[T32454\]  el1h\_64\_sync+0x68/0x6c

\[65731.260269\] \[T32454\]  z\_erofs\_decompress\_queue+0x7f0/0x2258
--\> be-\>decompressed\_pages = kvcalloc(be-\>nr\_pages, sizeof(struct page \*), GFP\_KERNEL \| \_\_GFP\_NOFAIL);
	kernel panic by NULL pointer dereference.
	erofs assume kvmalloc with \_\_GFP\_NOFAIL never return NULL.
\[65731.260293\] \[T32454\]  z\_erofs\_runqueue+0xf30/0x104c
\[65731.260314\] \[T32454\]  z\_erofs\_readahead+0x4f0/0x968
\[65731.260339\] \[T32454\]  read\_pages+0x170/0xadc
\[65731.260364\] \[T32454\]  page\_cache\_ra\_unbounded+0x874/0xf30
\[65731.260388\] \[T32454\]  page\_cache\_ra\_order+0x24c/0x714
\[65731.260411\] \[T32454\]  filemap\_fault+0xbf0/0x1a74
\[65731.260437\] \[T32454\]  \_\_do\_fault+0xd0/0x33c
\[65731.260462\] \[T32454\]  handle\_mm\_fault+0xf74/0x3fe0
\[65731.260486\] \[T32454\]  do\_mem\_abort+0x54c/0x1b34
\[65731.260509\] \[T32454\]  el0\_da+0x44/0x94
\[65731.260531\] \[T32454\]  el0t\_64\_sync\_handler+0x98/0xb4
\[65731.260553\] \[T32454\]  el0t\_64\_sync+0x198/0x19c

## Affected and fixed versions

- Linux: \>= 9376130c390a76fac2788a5d6e1a149017b4ab50, \< 198a80833e3421d4c9820a4ae907120adf598c91; \>= 9376130c390a76fac2788a5d6e1a149017b4ab50, \< c55d3564ad25ce87ab7cc6af251f9574faebd8da; \>= 9376130c390a76fac2788a5d6e1a149017b4ab50, \< 758678b65164b2158fc1de411092191cb3c394d4; \>= 9376130c390a76fac2788a5d6e1a149017b4ab50, \< 8e0545c83d672750632f46e3f9ad95c48c91a0fc (cvelist)
- Linux: 5.17 (cvelist)

## Mitigation

- Upgrade Linux to 8e0545c83d672750632f46e3f9ad95c48c91a0fc or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-39474. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-39474.md
Affected: Linux >= 9376130c390a76fac2788a5d6e1a149017b4ab50, < 198a80833e3421d4c9820a4ae907120adf598c91; >= 9376130c390a76fac2788a5d6e1a149017b4ab50, < c55d3564ad25ce87ab7cc6af251f9574faebd8da; >= 9376130c390a76fac2788a5d6e1a149017b4ab50, < 758678b65164b2158fc1de411092191cb3c394d4; >= 9376130c390a76fac2788a5…
Fixed in: Linux 198a80833e3421d4c9820a4ae907120adf598c91, Linux 758678b65164b2158fc1de411092191cb3c394d4, Linux 8e0545c83d672750632f46e3f9ad95c48c91a0fc

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-39474 being exploited?

There is no confirmed exploitation: CVE-2024-39474 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-39474?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-39474?

Linux \>= 9376130c390a76fac2788a5d6e1a149017b4ab50, \< 198a80833e3421d4c9820a4ae907120adf598c91; \>= 9376130c390a76fac2788a5d6e1a149017b4ab50, \< c55d3564ad25ce87ab7cc6af251f9574faebd8da; \>= 9376130c390a76fac2788a5d6e1a149017b4ab50, \< 758678b65164b2158fc1de411092191cb3c394d4; \>= 9376130c390a76fac2788a5d6e1a149017b4ab50, \< 8e0545c83d672750632f46e3f9ad95c48c91a0fc; Linux 5.17.

### Is there a fix for CVE-2024-39474?

Yes. Fixed in Linux 198a80833e3421d4c9820a4ae907120adf598c91, Linux 758678b65164b2158fc1de411092191cb3c394d4, Linux 8e0545c83d672750632f46e3f9ad95c48c91a0fc. Upgrade Linux to 8e0545c83d672750632f46e3f9ad95c48c91a0fc or later.

### How do I check if I'm affected by CVE-2024-39474?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/198a80833e3421d4c9820a4ae907120adf598c91>
- patch: <https://git.kernel.org/stable/c/c55d3564ad25ce87ab7cc6af251f9574faebd8da>
- patch: <https://git.kernel.org/stable/c/758678b65164b2158fc1de411092191cb3c394d4>
- patch: <https://git.kernel.org/stable/c/8e0545c83d672750632f46e3f9ad95c48c91a0fc>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-39474>

HTML: <https://flawdb.com/CVE-2024-39474> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-39474>
