CVE-2024-41021

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-41021
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-41021.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-41021
Downstream
Published
2024-07-29T13:34:22Z
Modified
2025-10-17T09:16:33.073946Z
Summary
s390/mm: Fix VM_FAULT_HWPOISON handling in do_exception()
Details

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

s390/mm: Fix VMFAULTHWPOISON handling in do_exception()

There is no support for HWPOISON, MEMORYFAILURE, or ARCHHASCOPYMC on s390. Therefore we do not expect to see VMFAULTHWPOISON in do_exception().

However, since commit af19487f00f3 ("mm: make PTEMARKERSWAPINERROR more general"), it is possible to see VMFAULTHWPOISON in combination with PTEMARKERPOISONED, even on architectures that do not support HWPOISON otherwise. In this case, we will end up on the BUG() in doexception().

Fix this by treating VMFAULTHWPOISON the same as VMFAULTSIGBUS, similar to x86 when MEMORY_FAILURE is not configured. Also print unexpected fault flags, for easier debugging.

Note that VMFAULTHWPOISON_LARGE is not expected, because s390 cannot support swap entries on other levels than PTE level.

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
af19487f00f34ff8643921d7909dbb3fedc7e329
Fixed
73a9260b7366d2906ec011e100319359fe2277d0
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
af19487f00f34ff8643921d7909dbb3fedc7e329
Fixed
9e13767ccefdc4f8aa92514b592b60f6b54882ff
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
af19487f00f34ff8643921d7909dbb3fedc7e329
Fixed
a3aefb871222a9880602d1a44a558177b4143e3b
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
af19487f00f34ff8643921d7909dbb3fedc7e329
Fixed
df39038cd89525d465c2c8827eb64116873f141a

Affected versions

v6.*

v6.10
v6.10-rc1
v6.10-rc2
v6.10-rc3
v6.10-rc4
v6.10-rc5
v6.10-rc6
v6.10-rc7
v6.10.1
v6.5
v6.5-rc5
v6.5-rc6
v6.5-rc7
v6.6
v6.6-rc1
v6.6-rc2
v6.6-rc3
v6.6-rc4
v6.6-rc5
v6.6-rc6
v6.6-rc7
v6.6.1
v6.6.10
v6.6.11
v6.6.12
v6.6.13
v6.6.14
v6.6.15
v6.6.16
v6.6.17
v6.6.18
v6.6.19
v6.6.2
v6.6.20
v6.6.21
v6.6.22
v6.6.23
v6.6.24
v6.6.25
v6.6.26
v6.6.27
v6.6.28
v6.6.29
v6.6.3
v6.6.30
v6.6.31
v6.6.32
v6.6.33
v6.6.34
v6.6.35
v6.6.36
v6.6.37
v6.6.38
v6.6.39
v6.6.4
v6.6.40
v6.6.41
v6.6.42
v6.6.43
v6.6.5
v6.6.6
v6.6.7
v6.6.8
v6.6.9
v6.7
v6.7-rc1
v6.7-rc2
v6.7-rc3
v6.7-rc4
v6.7-rc5
v6.7-rc6
v6.7-rc7
v6.7-rc8
v6.8
v6.8-rc1
v6.8-rc2
v6.8-rc3
v6.8-rc4
v6.8-rc5
v6.8-rc6
v6.8-rc7
v6.9
v6.9-rc1
v6.9-rc2
v6.9-rc3
v6.9-rc4
v6.9-rc5
v6.9-rc6
v6.9-rc7
v6.9.1
v6.9.10
v6.9.11
v6.9.2
v6.9.3
v6.9.4
v6.9.5
v6.9.6
v6.9.7
v6.9.8
v6.9.9

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.6.0
Fixed
6.6.44
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.9.12
Type
ECOSYSTEM
Events
Introduced
6.10.0
Fixed
6.10.2