CVE-2024-39474

See a problem?
Source
https://nvd.nist.gov/vuln/detail/CVE-2024-39474
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-39474.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-39474
Related
Published
2024-07-05T07:15:10Z
Modified
2024-09-18T03:26:29.553532Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
[none]
Details

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

mm/vmalloc: fix vmalloc which may return null if called with _GFPNOFAIL

commit a421ef303008 ("mm: allow !GFPKERNEL 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 _vmallocnoderange(GFPKERNEL | _GFPNOFAIL) _vmallocareanode() vmareaallocpages() --> oom-killer send SIGKILL to process-a if (fatalsignalpending(current)) break; --> return NULL;

To fix this, do not check fatalsignalpending() in vmareaallocpages() 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=CONSTRAINTNONE,nodemask=(null),cpuset=/,memsallowed=0,globaloom,taskmemcg=/apps/uid_10198,task=gs.intelligence,pid=32454,uid=10198

[65731.259685] [T32454] Call trace: [65731.259698] [T32454] dumpbacktrace+0xf4/0x118 [65731.259734] [T32454] showstack+0x18/0x24 [65731.259756] [T32454] dumpstacklvl+0x60/0x7c [65731.259781] [T32454] dumpstack+0x18/0x38 [65731.259800] [T32454] mrdumpcommondie+0x250/0x39c [mrdump] [65731.259936] [T32454] ipanicdie+0x20/0x34 [mrdump] [65731.260019] [T32454] atomicnotifiercallchain+0xb4/0xfc [65731.260047] [T32454] notifydie+0x114/0x198 [65731.260073] [T32454] die+0xf4/0x5b4 [65731.260098] [T32454] diekernelfault+0x80/0x98 [65731.260124] [T32454] _dokernelfault+0x160/0x2a8 [65731.260146] [T32454] dobadarea+0x68/0x148 [65731.260174] [T32454] domemabort+0x151c/0x1b34 [65731.260204] [T32454] el1abort+0x3c/0x5c [65731.260227] [T32454] el1h64synchandler+0x54/0x90 [65731.260248] [T32454] el1h64_sync+0x68/0x6c

[65731.260269] [T32454] zerofsdecompressqueue+0x7f0/0x2258 --> be->decompressedpages = kvcalloc(be->nrpages, sizeof(struct page *), GFPKERNEL | _GFPNOFAIL); kernel panic by NULL pointer dereference. erofs assume kvmalloc with _GFPNOFAIL never return NULL. [65731.260293] [T32454] zerofsrunqueue+0xf30/0x104c [65731.260314] [T32454] zerofsreadahead+0x4f0/0x968 [65731.260339] [T32454] readpages+0x170/0xadc [65731.260364] [T32454] pagecacheraunbounded+0x874/0xf30 [65731.260388] [T32454] pagecacheraorder+0x24c/0x714 [65731.260411] [T32454] filemapfault+0xbf0/0x1a74 [65731.260437] [T32454] _dofault+0xd0/0x33c [65731.260462] [T32454] handlemmfault+0xf74/0x3fe0 [65731.260486] [T32454] domemabort+0x54c/0x1b34 [65731.260509] [T32454] el0da+0x44/0x94 [65731.260531] [T32454] el0t64synchandler+0x98/0xb4 [65731.260553] [T32454] el0t64sync+0x198/0x19c

References

Affected packages

Debian:12 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.1.99-1

Affected versions

6.*

6.1.27-1
6.1.37-1
6.1.38-1
6.1.38-2~bpo11+1
6.1.38-2
6.1.38-3
6.1.38-4~bpo11+1
6.1.38-4
6.1.52-1
6.1.55-1~bpo11+1
6.1.55-1
6.1.64-1
6.1.66-1
6.1.67-1
6.1.69-1~bpo11+1
6.1.69-1
6.1.76-1~bpo11+1
6.1.76-1
6.1.82-1
6.1.85-1
6.1.90-1~bpo11+1
6.1.90-1
6.1.94-1~bpo11+1
6.1.94-1
6.1.98-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:13 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.9.7-1

Affected versions

6.*

6.1.27-1
6.1.37-1
6.1.38-1
6.1.38-2~bpo11+1
6.1.38-2
6.1.38-3
6.1.38-4~bpo11+1
6.1.38-4
6.1.52-1
6.1.55-1~bpo11+1
6.1.55-1
6.1.64-1
6.1.66-1
6.1.67-1
6.1.69-1~bpo11+1
6.1.69-1
6.1.76-1~bpo11+1
6.1.76-1
6.1.82-1
6.1.85-1
6.1.90-1~bpo11+1
6.1.90-1
6.1.94-1~bpo11+1
6.1.94-1
6.1.98-1
6.1.99-1
6.1.106-1
6.1.106-2
6.1.106-3
6.3.1-1~exp1
6.3.2-1~exp1
6.3.4-1~exp1
6.3.5-1~exp1
6.3.7-1~bpo12+1
6.3.7-1
6.3.11-1
6.4~rc6-1~exp1
6.4~rc7-1~exp1
6.4.1-1~exp1
6.4.4-1~bpo12+1
6.4.4-1
6.4.4-2
6.4.4-3~bpo12+1
6.4.4-3
6.4.11-1
6.4.13-1
6.5~rc4-1~exp1
6.5~rc6-1~exp1
6.5~rc7-1~exp1
6.5.1-1~exp1
6.5.3-1~bpo12+1
6.5.3-1
6.5.6-1
6.5.8-1
6.5.10-1~bpo12+1
6.5.10-1
6.5.13-1
6.6.3-1~exp1
6.6.4-1~exp1
6.6.7-1~exp1
6.6.8-1
6.6.9-1
6.6.11-1
6.6.13-1~bpo12+1
6.6.13-1
6.6.15-1
6.6.15-2
6.7-1~exp1
6.7.1-1~exp1
6.7.4-1~exp1
6.7.7-1
6.7.9-1
6.7.9-2
6.7.12-1~bpo12+1
6.7.12-1
6.8.9-1
6.8.11-1
6.8.12-1~bpo12+1
6.8.12-1
6.9.2-1~exp1
6.9.7-1~bpo12+1

Ecosystem specific

{
    "urgency": "not yet assigned"
}