CyberSecBulletin
CVE-2022-50229NVD status: Analyzed

Linux: Use After Free

CVE-2022-50229 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 a718eba7e458e2f40531be3c6b6a0028ca7fcace, 4fc41f7ebb7efca282f1740ea934d16f33c1d109, 5e7338f4dd92b2f8915a82abfa1dd3ad3464bea0 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.26% 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 a718eba7e458e2f40531be3c6b6a0028ca7fcace or 4fc41f7ebb7efca282f1740ea934d16f33c1d109 or 5e7338f4dd92b2f8915a82abfa1dd3ad3464bea0 or 05e0bb8c3c4dde3e21b9c1cf9395afb04e8b24db, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 4.9.326 or 4.14.291 or 4.19.256 or 5.4.211, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinuxb47a22290d581277be70e8a597824a4985d39e83 up to, but not including, a718eba7e458e2f40531be3c6b6a0028ca7fcace; b47a22290d581277be70e8a597824a4985d39e83 up to, but not including, 4fc41f7ebb7efca282f1740ea934d16f33c1d109; b47a22290d581277be70e8a597824a4985d39e83 up to, but not including, 5e7338f4dd92b2f8915a82abfa1dd3ad3464bea0; b47a22290d581277be70e8a597824a4985d39e83 up to, but not including, 05e0bb8c3c4dde3e21b9c1cf9395afb04e8b24db; b47a22290d581277be70e8a597824a4985d39e83 up to, but not including, 348620464a5c127399ac09b266f494f393661952; b47a22290d581277be70e8a597824a4985d39e83 up to, but not including, 64ca7f50ad96c2c65ae390b954925a36eabe04aa; b47a22290d581277be70e8a597824a4985d39e83 up to, but not including, 1d6a246cf97c380f2da76591f03019dd9c9599c3; b47a22290d581277be70e8a597824a4985d39e83 up to, but not including, b0d4af0a4763ddc02344789ef2a281c494bc330d; and 2 more rangesa718eba7e458e2f40531be3c6b6a0028ca7fcace, 4fc41f7ebb7efca282f1740ea934d16f33c1d109, 5e7338f4dd92b2f8915a82abfa1dd3ad3464bea0, 05e0bb8c3c4dde3e21b9c1cf9395afb04e8b24db, 348620464a5c127399ac09b266f494f393661952, 64ca7f50ad96c2c65ae390b954925a36eabe04aa
LinuxLinux Kernel3.16 up to, but not including, 4.9.326; 4.10 up to, but not including, 4.14.291; 4.15 up to, but not including, 4.19.256; 4.20 up to, but not including, 5.4.211; 5.5 up to, but not including, 5.10.137; 5.11 up to, but not including, 5.15.61; 5.16 up to, but not including, 5.18.18; 5.19 up to, but not including, 5.19.24.9.326, 4.14.291, 4.19.256, 5.4.211, 5.10.137, 5.15.61

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.

Official description

In the Linux kernel, the following vulnerability has been resolved: ALSA: bcd2000: Fix a UAF bug on the error path of probing When the driver fails in snd_card_register() at probe time, it will free the 'bcd2k->midi_out_urb' before killing it, which may cause a UAF bug. The following log can reveal it: [ 50.727020] BUG: KASAN: use-after-free in bcd2000_input_complete+0x1f1/0x2e0 [snd_bcd2000] [ 50.727623] Read of size 8 at addr ffff88810fab0e88 by task swapper/4/0 [ 50.729530] Call Trace: [ 50.732899] bcd2000_input_complete+0x1f1/0x2e0 [snd_bcd2000] Fix this by adding usb_kill_urb() before usb_free_urb().

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. Record last changed materially (score, affected products, status or references).

References

Recent Use After Free vulnerabilities

Spotted an error? Tell us.