CyberSecBulletin
CVE-2022-49078NVD status: Analyzed

Linux: Use After Free

CVE-2022-49078 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 73953dfa9d50e5c9fe98ee13fd1d3427aa12a0a3, 6adc01a7aa37445dafe8846faa0610a86029b253, 9fb8bc6cfc58773ce95414e11c9ccc8fc6ac4927 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 73953dfa9d50e5c9fe98ee13fd1d3427aa12a0a3 or 6adc01a7aa37445dafe8846faa0610a86029b253 or 9fb8bc6cfc58773ce95414e11c9ccc8fc6ac4927 or e64dbe97c05c769525cbca099ddbd22485630235, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 5.4.189 or 5.10.111 or 5.15.34 or 5.16.20, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux2209fda323e2fd2a2d0885595fd5097717f8d2aa up to, but not including, 73953dfa9d50e5c9fe98ee13fd1d3427aa12a0a3; 2209fda323e2fd2a2d0885595fd5097717f8d2aa up to, but not including, 6adc01a7aa37445dafe8846faa0610a86029b253; 2209fda323e2fd2a2d0885595fd5097717f8d2aa up to, but not including, 9fb8bc6cfc58773ce95414e11c9ccc8fc6ac4927; 2209fda323e2fd2a2d0885595fd5097717f8d2aa up to, but not including, e64dbe97c05c769525cbca099ddbd22485630235; 2209fda323e2fd2a2d0885595fd5097717f8d2aa up to, but not including, 467d5e200ab4486b744fe1776154a43d1aa22d4b; 2209fda323e2fd2a2d0885595fd5097717f8d2aa up to, but not including, eafc0a02391b7b36617b36c97c4b5d6832cf5e24; 4.2073953dfa9d50e5c9fe98ee13fd1d3427aa12a0a3, 6adc01a7aa37445dafe8846faa0610a86029b253, 9fb8bc6cfc58773ce95414e11c9ccc8fc6ac4927, e64dbe97c05c769525cbca099ddbd22485630235, 467d5e200ab4486b744fe1776154a43d1aa22d4b, eafc0a02391b7b36617b36c97c4b5d6832cf5e24
LinuxLinux Kernel4.20 up to, but not including, 5.4.189; 5.5 up to, but not including, 5.10.111; 5.11 up to, but not including, 5.15.34; 5.16 up to, but not including, 5.16.20; 5.17 up to, but not including, 5.17.35.4.189, 5.10.111, 5.15.34, 5.16.20, 5.17.3

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: lz4: fix LZ4_decompress_safe_partial read out of bound When partialDecoding, it is EOF if we've either filled the output buffer or can't proceed with reading an offset for following match. In some extreme corner cases when compressed data is suitably corrupted, UAF will occur. As reported by KASAN [1], LZ4_decompress_safe_partial may lead to read out of bound problem during decoding. lz4 upstream has fixed it [2] and this issue has been disscussed here [3] before. current decompression routine was ported from lz4 v1.8.3, bumping lib/lz4 to v1.9.+ is certainly a huge work to be done later, so, we'd better fix it first. [1] https://lore.kernel.org/all/[email protected]/ [2] https://github.com/lz4/lz4/commit/c5d6f8a8be3927c0bec91bcc58667a6cfad244ad# [3] https://lore.kernel.org/all/[email protected]/

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.