CyberSecBulletin
CVE-2022-49990NVD status: Modified

Linux: Double Free

CVE-2022-49990 is a high-severity double free vulnerability in Linux, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an attacker with a low-privileged account, without any action from a user. The record lists versions 25a95303b9e513cd2978aacc385d06e6fec23d07, cacd522e6652fbc2dc0cc6ae11c4e30782fef14b, 297ae7e87a87a001dd3dfeac1cb26a42fd929708 as the first without the flaw, so updating Linux to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.28% chance of exploitation within 30 days, which is low compared with other CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update Linux to 25a95303b9e513cd2978aacc385d06e6fec23d07 or cacd522e6652fbc2dc0cc6ae11c4e30782fef14b or 297ae7e87a87a001dd3dfeac1cb26a42fd929708 or 8195e065abf3df84eb0ad2987e76a40f21d1791c, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 4.5 or 4.10 or 4.19.257 or 5.4.212, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux8d9047f8b967ce6181fd824ae922978e1b055cc0 up to, but not including, 25a95303b9e513cd2978aacc385d06e6fec23d07; 8d9047f8b967ce6181fd824ae922978e1b055cc0 up to, but not including, cacd522e6652fbc2dc0cc6ae11c4e30782fef14b; 8d9047f8b967ce6181fd824ae922978e1b055cc0 up to, but not including, 297ae7e87a87a001dd3dfeac1cb26a42fd929708; 8d9047f8b967ce6181fd824ae922978e1b055cc0 up to, but not including, 8195e065abf3df84eb0ad2987e76a40f21d1791c; 8d9047f8b967ce6181fd824ae922978e1b055cc0 up to, but not including, fbdc482d43eda40a70de4b0155843d5472f6de62; 8d9047f8b967ce6181fd824ae922978e1b055cc0 up to, but not including, 13cccafe0edcd03bf1c841de8ab8a1c8e34f77d9; 9e51ee1b76efc7b5e9404010793a39fde0e03cb7; 232b47b3c88af1da737cd7760f247c4ed58168cf; and 5 more ranges25a95303b9e513cd2978aacc385d06e6fec23d07, cacd522e6652fbc2dc0cc6ae11c4e30782fef14b, 297ae7e87a87a001dd3dfeac1cb26a42fd929708, 8195e065abf3df84eb0ad2987e76a40f21d1791c, fbdc482d43eda40a70de4b0155843d5472f6de62, 13cccafe0edcd03bf1c841de8ab8a1c8e34f77d9
LinuxLinux Kernel4.4.105 up to, but not including, 4.5; 4.9.68 up to, but not including, 4.10; 4.14.5 up to, but not including, 4.19.257; 4.20 up to, but not including, 5.4.212; 5.5 up to, but not including, 5.10.140; 5.11 up to, but not including, 5.15.64; 5.16 up to, but not including, 5.19.6; 6.04.5, 4.10, 4.19.257, 5.4.212, 5.10.140, 5.15.64

Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
LocalThe attacker needs local access or must trick a user into running something.
Attack complexity
LowNo special conditions are needed; the attack works reliably.
Privileges required
LowA basic user account is enough.
User interaction
NoneNo action by a victim is required.
Scope
UnchangedImpact stays within the vulnerable component.
Confidentiality
HighAll data handled by the component can be read.
Integrity
HighData or code can be modified at will.
Availability
HighThe component can be taken down completely.

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.

Scoring systemScoreSeverityScored by
CVSS 3.17.8HighCNA
CVSS 3.17.8HighNVD

Official description

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 thread_struct of the associated task. These pointers are initially copied on fork() via arch_dup_task_struct() and then cleared via copy_thread() before fork() returns. If fork() happens to fail after the initial task dup and before copy_thread(), the newly allocated task and associated thread_struct memory are freed via free_task() -> arch_release_task_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 BUG_ON() in set_freepointer() (with CONFIG_SLAB_FREELIST_HARDENED enabled) or KASAN splat (if enabled) when running trinity syscall fuzz tests on s390x. To avoid this problem, clear the associated pointer fields in arch_dup_task_struct() 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.

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Double Free

The product calls free() twice on the same memory address.

How developers prevent this class of flaw

  • Choose a language that provides automatic memory management.
  • Ensure that each allocation is freed only once. After freeing a chunk, set the pointer to NULL to ensure the pointer cannot be freed again. In complicated error conditions, be sure that clean-up routines respect the state of allocation properly. If the language is object oriented, ensure that object destructors delete each chunk of memory only once.
  • Use a static analysis tool to find double free instances.

More Double Free vulnerabilities (CWE-415)

Timeline

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
  3. Record last changed materially (score, affected products, status or references).

References

Recent Double Free vulnerabilities

Spotted an error? Tell us.