CyberSecBulletin
CVE-2022-49696NVD status: Analyzed

Linux: Use After Free

CVE-2022-49696 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 361c5521c1e49843b710f455cae3c0a50b714323, cd7789e659e84f137631dc1f5ec8d794f2700e6c, 8b246ddd394d7d9640816611693b0096b998e27a 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.29% 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 361c5521c1e49843b710f455cae3c0a50b714323 or cd7789e659e84f137631dc1f5ec8d794f2700e6c or 8b246ddd394d7d9640816611693b0096b998e27a or 911600bf5a5e84bfda4d33ee32acc75ecf6159f0, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 5.5 or 5.10.127 or 5.15.51 or 5.18.8, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinuxd966ddcc38217a6110a6a0ff37ad2dee7d42e23e up to, but not including, 361c5521c1e49843b710f455cae3c0a50b714323; d966ddcc38217a6110a6a0ff37ad2dee7d42e23e up to, but not including, cd7789e659e84f137631dc1f5ec8d794f2700e6c; d966ddcc38217a6110a6a0ff37ad2dee7d42e23e up to, but not including, 8b246ddd394d7d9640816611693b0096b998e27a; d966ddcc38217a6110a6a0ff37ad2dee7d42e23e up to, but not including, 911600bf5a5e84bfda4d33ee32acc75ecf6159f0; fdc1416c21992ea7b4737123c8aa8c7424a1a540; 1716c9bd567bc6cdb3d18be78f36941a306b708d; 5.4.83 up to, but not including, 5.5; 5.9.14 up to, but not including, 5.10; and 1 more ranges361c5521c1e49843b710f455cae3c0a50b714323, cd7789e659e84f137631dc1f5ec8d794f2700e6c, 8b246ddd394d7d9640816611693b0096b998e27a, 911600bf5a5e84bfda4d33ee32acc75ecf6159f0, 5.5, 5.10
LinuxLinux Kernel5.4.83 up to, but not including, 5.5; 5.9.14 up to, but not including, 5.10.127; 5.11 up to, but not including, 5.15.51; 5.16 up to, but not including, 5.18.8; 5.195.5, 5.10.127, 5.15.51, 5.18.8

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 CISA (ADP).

Official description

In the Linux kernel, the following vulnerability has been resolved: tipc: fix use-after-free Read in tipc_named_reinit syzbot found the following issue on: ================================================================== BUG: KASAN: use-after-free in tipc_named_reinit+0x94f/0x9b0 net/tipc/name_distr.c:413 Read of size 8 at addr ffff88805299a000 by task kworker/1:9/23764 CPU: 1 PID: 23764 Comm: kworker/1:9 Not tainted 5.18.0-rc4-syzkaller-00878-g17d49e6e8012 #0 Hardware name: Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events tipc_net_finalize_work Call Trace: <TASK> __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0xeb/0x495 mm/kasan/report.c:313 print_report mm/kasan/report.c:429 [inline] kasan_report.cold+0xf4/0x1c6 mm/kasan/report.c:491 tipc_named_reinit+0x94f/0x9b0 net/tipc/name_distr.c:413 tipc_net_finalize+0x234/0x3d0 net/tipc/net.c:138 process_one_work+0x996/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e9/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 </TASK> [...] ================================================================== In the commit d966ddcc3821 ("tipc: fix a deadlock when flushing scheduled work"), the cancel_work_sync() function just to make sure ONLY the work tipc_net_finalize_work() is executing/pending on any CPU completed before tipc namespace is destroyed through tipc_exit_net(). But this function is not guaranteed the work is the last queued. So, the destroyed instance may be accessed in the work which will try to enqueue later. In order to completely fix, we re-order the calling of cancel_work_sync() to make sure the work tipc_net_finalize_work() was last queued and it must be completed by calling cancel_work_sync().

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.