CVE-2022-49990

Source
https://cve.org/CVERecord?id=CVE-2022-49990
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49990.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-49990
Downstream
Related
Published
2025-06-18T11:00:51.035Z
Modified
2026-03-20T12:22:31.696226Z
Summary
s390: fix double free of GS and RI CBs on fork() failure
Details

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

s390: fix double free of GS and RI CBs on fork() failure

The pointers for guarded storage and runtime instrumentation control blocks are stored in the threadstruct of the associated task. These pointers are initially copied on fork() via archduptaskstruct() and then cleared via copythread() before fork() returns. If fork() happens to fail after the initial task dup and before copythread(), the newly allocated task and associated threadstruct memory are freed via freetask() -> archreleasetask_struct(). This results in a double free of the guarded storage and runtime info structs because the fields in the failed task still refer to memory associated with the source task.

This problem can manifest as a BUGON() in setfreepointer() (with CONFIGSLABFREELISTHARDENED enabled) or KASAN splat (if enabled) when running trinity syscall fuzz tests on s390x. To avoid this problem, clear the associated pointer fields in archduptaskstruct() immediately after the new task is copied. Note that the RI flag is still cleared in copy_thread() because it resides in thread stack memory and that is where stack info is copied.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49990.json",
    "cna_assigner": "Linux"
}
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
8d9047f8b967ce6181fd824ae922978e1b055cc0
Fixed
25a95303b9e513cd2978aacc385d06e6fec23d07
Fixed
cacd522e6652fbc2dc0cc6ae11c4e30782fef14b
Fixed
297ae7e87a87a001dd3dfeac1cb26a42fd929708
Fixed
8195e065abf3df84eb0ad2987e76a40f21d1791c
Fixed
fbdc482d43eda40a70de4b0155843d5472f6de62
Fixed
13cccafe0edcd03bf1c841de8ab8a1c8e34f77d9
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
9e51ee1b76efc7b5e9404010793a39fde0e03cb7
Last affected
232b47b3c88af1da737cd7760f247c4ed58168cf
Last affected
b8e212c599082896a180a18a0c9bd529526590be

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49990.json"