CyberSecBulletin
CVE-2022-49524NVD status: Analyzed

Linux: Use After Free

CVE-2022-49524 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 6041d1a0365baa729b6adfb6ed5386d9388018db, 7b9978e1c94e569d65a0e7e719abb9340f5db4a0, fa636e9ee4442215cd9a2e079cd5a8e1fe0cb8ba 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.27% 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 6041d1a0365baa729b6adfb6ed5386d9388018db or 7b9978e1c94e569d65a0e7e719abb9340f5db4a0 or fa636e9ee4442215cd9a2e079cd5a8e1fe0cb8ba or ca17e7a532d1a55466cc007b3f4d319541a27493, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 4.14.283 or 4.19.247 or 5.4.198 or 5.10.121, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux2bc46b3ad3c15165f91459b07ff8682478683194 up to, but not including, 6041d1a0365baa729b6adfb6ed5386d9388018db; 2bc46b3ad3c15165f91459b07ff8682478683194 up to, but not including, 7b9978e1c94e569d65a0e7e719abb9340f5db4a0; 2bc46b3ad3c15165f91459b07ff8682478683194 up to, but not including, fa636e9ee4442215cd9a2e079cd5a8e1fe0cb8ba; 2bc46b3ad3c15165f91459b07ff8682478683194 up to, but not including, ca17e7a532d1a55466cc007b3f4d319541a27493; 2bc46b3ad3c15165f91459b07ff8682478683194 up to, but not including, 98106f100f50c487469903b9cf6d966785fc9cc3; 2bc46b3ad3c15165f91459b07ff8682478683194 up to, but not including, 86bd6a579c6c60547706cabf299cd2c9feab3332; 2bc46b3ad3c15165f91459b07ff8682478683194 up to, but not including, 453514a874c78df1e7804e6e3aaa60c8d8deb6a8; 2bc46b3ad3c15165f91459b07ff8682478683194 up to, but not including, e8123311cf06d7dae71e8c5fe78e0510d20cd30b; and 1 more ranges6041d1a0365baa729b6adfb6ed5386d9388018db, 7b9978e1c94e569d65a0e7e719abb9340f5db4a0, fa636e9ee4442215cd9a2e079cd5a8e1fe0cb8ba, ca17e7a532d1a55466cc007b3f4d319541a27493, 98106f100f50c487469903b9cf6d966785fc9cc3, 86bd6a579c6c60547706cabf299cd2c9feab3332
LinuxLinux Kernelbefore 4.14.283; 4.15 up to, but not including, 4.19.247; 4.20 up to, but not including, 5.4.198; 5.5 up to, but not including, 5.10.121; 5.11 up to, but not including, 5.15.46; 5.16 up to, but not including, 5.17.14; 5.18 up to, but not including, 5.18.34.14.283, 4.19.247, 5.4.198, 5.10.121, 5.15.46, 5.17.14

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: media: pci: cx23885: Fix the error handling in cx23885_initdev() When the driver fails to call the dma_set_mask(), the driver will get the following splat: [ 55.853884] BUG: KASAN: use-after-free in __process_removed_driver+0x3c/0x240 [ 55.854486] Read of size 8 at addr ffff88810de60408 by task modprobe/590 [ 55.856822] Call Trace: [ 55.860327] __process_removed_driver+0x3c/0x240 [ 55.861347] bus_for_each_dev+0x102/0x160 [ 55.861681] i2c_del_driver+0x2f/0x50 This is because the driver has initialized the i2c related resources in cx23885_dev_setup() but not released them in error handling, fix this bug by modifying the error path that jumps after failing to call the dma_set_mask().

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.