CyberSecBulletin
CVE-2022-49685NVD status: Analyzed

Linux: Use After Free

CVE-2022-49685 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 d6111e7bdb8ec27eb43d01c4cd4ff1620a75f7f2, fd5d8fb298a2866c337da635c79d63c3afabcaf7, 31ff3309b47d98313c61b8301bf595820cc3cc33 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 d6111e7bdb8ec27eb43d01c4cd4ff1620a75f7f2 or fd5d8fb298a2866c337da635c79d63c3afabcaf7 or 31ff3309b47d98313c61b8301bf595820cc3cc33 or 5e39397d60dacc7f5d81d442c1c958eaaaf31128, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 4.9.321 or 4.14.286 or 4.19.250 or 5.4.202, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinuxf38bc926d022ebd67baad6ac7fc22c95fbc6238c up to, but not including, d6111e7bdb8ec27eb43d01c4cd4ff1620a75f7f2; f38bc926d022ebd67baad6ac7fc22c95fbc6238c up to, but not including, fd5d8fb298a2866c337da635c79d63c3afabcaf7; f38bc926d022ebd67baad6ac7fc22c95fbc6238c up to, but not including, 31ff3309b47d98313c61b8301bf595820cc3cc33; f38bc926d022ebd67baad6ac7fc22c95fbc6238c up to, but not including, 5e39397d60dacc7f5d81d442c1c958eaaaf31128; f38bc926d022ebd67baad6ac7fc22c95fbc6238c up to, but not including, b07a30a774b3c3e584a68dc91779c68ea2da4813; f38bc926d022ebd67baad6ac7fc22c95fbc6238c up to, but not including, 4687c3f955240ca2a576bdc3f742d4d915b6272d; f38bc926d022ebd67baad6ac7fc22c95fbc6238c up to, but not including, 4ef1e521be610b720daeb7cf899fedc7db0274c4; f38bc926d022ebd67baad6ac7fc22c95fbc6238c up to, but not including, 78601726d4a59a291acc5a52da1d3a0a6831e4e8; and 1 more rangesd6111e7bdb8ec27eb43d01c4cd4ff1620a75f7f2, fd5d8fb298a2866c337da635c79d63c3afabcaf7, 31ff3309b47d98313c61b8301bf595820cc3cc33, 5e39397d60dacc7f5d81d442c1c958eaaaf31128, b07a30a774b3c3e584a68dc91779c68ea2da4813, 4687c3f955240ca2a576bdc3f742d4d915b6272d
LinuxLinux Kernel3.7 up to, but not including, 4.9.321; 4.10 up to, but not including, 4.14.286; 4.15 up to, but not including, 4.19.250; 4.20 up to, but not including, 5.4.202; 5.5 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.194.9.321, 4.14.286, 4.19.250, 5.4.202, 5.10.127, 5.15.51

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: iio: trigger: sysfs: fix use-after-free on remove Ensure that the irq_work has completed before the trigger is freed. ================================================================== BUG: KASAN: use-after-free in irq_work_run_list Read of size 8 at addr 0000000064702248 by task python3/25 Call Trace: irq_work_run_list irq_work_tick update_process_times tick_sched_handle tick_sched_timer __hrtimer_run_queues hrtimer_interrupt Allocated by task 25: kmem_cache_alloc_trace iio_sysfs_trig_add dev_attr_store sysfs_kf_write kernfs_fop_write_iter new_sync_write vfs_write ksys_write sys_write Freed by task 25: kfree iio_sysfs_trig_remove dev_attr_store sysfs_kf_write kernfs_fop_write_iter new_sync_write vfs_write ksys_write sys_write ==================================================================

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.