CyberSecBulletin
CVE-2022-50423NVD status: Modified

Linux: Use After Free

CVE-2022-50423 is a high-severity use after 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 133462d35dae95edb944af86b986d4c9dec59bd1, 02f237423c9c6a18e062de2d474f85d5659e4eb9, c9125b643fc51b8e662f2f614096ceb45a0adbc3 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.17% 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 133462d35dae95edb944af86b986d4c9dec59bd1 or 02f237423c9c6a18e062de2d474f85d5659e4eb9 or c9125b643fc51b8e662f2f614096ceb45a0adbc3 or dfdde4d5138bc023897033a5ac653a84e94805be, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 3.11 or 3.13 or 3.15 or 4.9.337, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux8aa5e56eeb61a099ea6519eb30ee399e1bc043ce up to, but not including, 133462d35dae95edb944af86b986d4c9dec59bd1; 8aa5e56eeb61a099ea6519eb30ee399e1bc043ce up to, but not including, 02f237423c9c6a18e062de2d474f85d5659e4eb9; 8aa5e56eeb61a099ea6519eb30ee399e1bc043ce up to, but not including, c9125b643fc51b8e662f2f614096ceb45a0adbc3; 8aa5e56eeb61a099ea6519eb30ee399e1bc043ce up to, but not including, dfdde4d5138bc023897033a5ac653a84e94805be; 8aa5e56eeb61a099ea6519eb30ee399e1bc043ce up to, but not including, 02617006b5a46f2ea55ac61f5693c7afd7bf9276; 8aa5e56eeb61a099ea6519eb30ee399e1bc043ce up to, but not including, 6fde666278f91b85d71545a0ebbf41d8d7af8074; 8aa5e56eeb61a099ea6519eb30ee399e1bc043ce up to, but not including, f51b2235e4f320edc839c3e5cb0d1f8a6e8657c6; 8aa5e56eeb61a099ea6519eb30ee399e1bc043ce up to, but not including, 01f2c2052ea50fb9a8ce12e4e83aed0267934ef0; and 10 more ranges133462d35dae95edb944af86b986d4c9dec59bd1, 02f237423c9c6a18e062de2d474f85d5659e4eb9, c9125b643fc51b8e662f2f614096ceb45a0adbc3, dfdde4d5138bc023897033a5ac653a84e94805be, 02617006b5a46f2ea55ac61f5693c7afd7bf9276, 6fde666278f91b85d71545a0ebbf41d8d7af8074
LinuxLinux Kernel3.10.55 up to, but not including, 3.11; 3.12.29 up to, but not including, 3.13; 3.14.19 up to, but not including, 3.15; 3.16.3 up to, but not including, 4.9.337; 4.10 up to, but not including, 4.14.303; 4.15 up to, but not including, 4.19.270; 4.20 up to, but not including, 5.4.229; 5.5 up to, but not including, 5.10.163; and 3 more ranges3.11, 3.13, 3.15, 4.9.337, 4.14.303, 4.19.270

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.8HighNVD
CVSS 3.17.8HighCISA (ADP)

Official description

In the Linux kernel, the following vulnerability has been resolved: ACPICA: Fix use-after-free in acpi_ut_copy_ipackage_to_ipackage() There is an use-after-free reported by KASAN: BUG: KASAN: use-after-free in acpi_ut_remove_reference+0x3b/0x82 Read of size 1 at addr ffff888112afc460 by task modprobe/2111 CPU: 0 PID: 2111 Comm: modprobe Not tainted 6.1.0-rc7-dirty Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), Call Trace: <TASK> kasan_report+0xae/0xe0 acpi_ut_remove_reference+0x3b/0x82 acpi_ut_copy_iobject_to_iobject+0x3be/0x3d5 acpi_ds_store_object_to_local+0x15d/0x3a0 acpi_ex_store+0x78d/0x7fd acpi_ex_opcode_1A_1T_1R+0xbe4/0xf9b acpi_ps_parse_aml+0x217/0x8d5 ... </TASK> The root cause of the problem is that the acpi_operand_object is freed when acpi_ut_walk_package_tree() fails in acpi_ut_copy_ipackage_to_ipackage(), lead to repeated release in acpi_ut_copy_iobject_to_iobject(). The problem was introduced by "8aa5e56eeb61" commit, this commit is to fix memory leak in acpi_ut_copy_iobject_to_iobject(), repeatedly adding remove operation, lead to "acpi_operand_object" used after free. Fix it by removing acpi_ut_remove_reference() in acpi_ut_copy_ipackage_to_ipackage(). acpi_ut_copy_ipackage_to_ipackage() is called to copy an internal package object into another internal package object, when it fails, the memory of acpi_operand_object should be freed by the caller.

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

The underlying weakness: Use After Free

The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory belongs to the code that operates on the new pointer.

How developers prevent this class of flaw

  • Choose a language that provides automatic memory management.
  • When freeing pointers, be sure to set them to NULL once they are freed. However, the utilization of multiple or complex data structures may lower the usefulness of this strategy.

More Use After Free vulnerabilities (CWE-416)

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 Use After Free vulnerabilities

Spotted an error? Tell us.