CVE-2022-49990
Severity CVSS v4.0:
Pending analysis
Type:
CWE-415
Double Free
Publication date:
18/06/2025
Last modified:
14/11/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
s390: fix double free of GS and RI CBs on fork() failure<br />
<br />
The pointers for guarded storage and runtime instrumentation control<br />
blocks are stored in the thread_struct of the associated task. These<br />
pointers are initially copied on fork() via arch_dup_task_struct()<br />
and then cleared via copy_thread() before fork() returns. If fork()<br />
happens to fail after the initial task dup and before copy_thread(),<br />
the newly allocated task and associated thread_struct memory are<br />
freed via free_task() -> arch_release_task_struct(). This results in<br />
a double free of the guarded storage and runtime info structs<br />
because the fields in the failed task still refer to memory<br />
associated with the source task.<br />
<br />
This problem can manifest as a BUG_ON() in set_freepointer() (with<br />
CONFIG_SLAB_FREELIST_HARDENED enabled) or KASAN splat (if enabled)<br />
when running trinity syscall fuzz tests on s390x. To avoid this<br />
problem, clear the associated pointer fields in<br />
arch_dup_task_struct() immediately after the new task is copied.<br />
Note that the RI flag is still cleared in copy_thread() because it<br />
resides in thread stack memory and that is where stack info is<br />
copied.
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.4.105 (including) | 4.5 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.9.68 (including) | 4.10 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.14.5 (including) | 4.19.257 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.20 (including) | 5.4.212 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5 (including) | 5.10.140 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.64 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 5.19.6 (excluding) |
| cpe:2.3:o:linux:linux_kernel:6.0:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.0:rc2:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/13cccafe0edcd03bf1c841de8ab8a1c8e34f77d9
- https://git.kernel.org/stable/c/25a95303b9e513cd2978aacc385d06e6fec23d07
- https://git.kernel.org/stable/c/297ae7e87a87a001dd3dfeac1cb26a42fd929708
- https://git.kernel.org/stable/c/8195e065abf3df84eb0ad2987e76a40f21d1791c
- https://git.kernel.org/stable/c/cacd522e6652fbc2dc0cc6ae11c4e30782fef14b
- https://git.kernel.org/stable/c/fbdc482d43eda40a70de4b0155843d5472f6de62



