CyberSecBulletin
CVE-2022-50496NVD status: Analyzed

Linux: Use After Free

CVE-2022-50496 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 034cbc8d3b47a56acd89453c29632a9c117de09d, 993406104d2b28fe470126a062ad37a1e21e792e, 4d20032dd90664de09f2902a7ea49ae2f7771746 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.17% 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 034cbc8d3b47a56acd89453c29632a9c117de09d or 993406104d2b28fe470126a062ad37a1e21e792e or 4d20032dd90664de09f2902a7ea49ae2f7771746 or 2f097dfac7579fd84ff98eb1d3acd41d53a485f3, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 4.9.337 or 4.14.303 or 4.19.270 or 5.4.229, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinuxc6b4fcbad044e6fffcc75bba160e720eb8d67d17 up to, but not including, 034cbc8d3b47a56acd89453c29632a9c117de09d; c6b4fcbad044e6fffcc75bba160e720eb8d67d17 up to, but not including, 993406104d2b28fe470126a062ad37a1e21e792e; c6b4fcbad044e6fffcc75bba160e720eb8d67d17 up to, but not including, 4d20032dd90664de09f2902a7ea49ae2f7771746; c6b4fcbad044e6fffcc75bba160e720eb8d67d17 up to, but not including, 2f097dfac7579fd84ff98eb1d3acd41d53a485f3; c6b4fcbad044e6fffcc75bba160e720eb8d67d17 up to, but not including, 2b17026685a270b2beaf1cdd9857fcedd3505c7e; c6b4fcbad044e6fffcc75bba160e720eb8d67d17 up to, but not including, d2a0b298ebf83ab6236f66788a3541e91ce75a70; c6b4fcbad044e6fffcc75bba160e720eb8d67d17 up to, but not including, 6ac4f36910764cb510bafc4c3768544f86ca48ca; c6b4fcbad044e6fffcc75bba160e720eb8d67d17 up to, but not including, 6a3e412c2ab131c54945327a7676b006f000a209; and 2 more ranges034cbc8d3b47a56acd89453c29632a9c117de09d, 993406104d2b28fe470126a062ad37a1e21e792e, 4d20032dd90664de09f2902a7ea49ae2f7771746, 2f097dfac7579fd84ff98eb1d3acd41d53a485f3, 2b17026685a270b2beaf1cdd9857fcedd3505c7e, d2a0b298ebf83ab6236f66788a3541e91ce75a70
LinuxLinux Kernel3.9 up to, but not including, 4.9.337; 4.10 up to, but not including, 4.14.303; 4.15 up to, but not including, 4.19.270; 4.20 up to, but not including, 5.4.229; 5.5 up to, but not including, 5.10.163; 5.11 up to, but not including, 5.15.87; 5.16 up to, but not including, 6.0.18; 6.1 up to, but not including, 6.1.44.9.337, 4.14.303, 4.19.270, 5.4.229, 5.10.163, 5.15.87

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: dm cache: Fix UAF in destroy() Dm_cache also has the same UAF problem when dm_resume() and dm_destroy() are concurrent. Therefore, cancelling timer again in destroy().

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.