Linux: Use After Free
CVE-2022-50022 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 7470a4314b239e9a9580f248fdf4c9a92805490e, 09cf99bace7789d91caa8d10fbcfc8b2fb35857f, e5b3dd2d92c4511e81f6e4ec9c5bb7ad25e03d13 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.
High severity with no evidence of exploitation so far.
What to do
- Update Linux to 7470a4314b239e9a9580f248fdf4c9a92805490e or 09cf99bace7789d91caa8d10fbcfc8b2fb35857f or e5b3dd2d92c4511e81f6e4ec9c5bb7ad25e03d13 or f5d46f1b47f65da1faf468277b261eb78c8e25b5, whichever matches your release line, or a later version.
- 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
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Linux | Linux | 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c up to, but not including, 7470a4314b239e9a9580f248fdf4c9a92805490e; 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c up to, but not including, 09cf99bace7789d91caa8d10fbcfc8b2fb35857f; 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c up to, but not including, e5b3dd2d92c4511e81f6e4ec9c5bb7ad25e03d13; 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c up to, but not including, f5d46f1b47f65da1faf468277b261eb78c8e25b5; 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c up to, but not including, 5d8325fd15892c8ab1146edc1d7ed8463de39636; 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c up to, but not including, d9b94c3ace549433de8a93eeb27b0391fc8ac406; 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c up to, but not including, eb3a4f73f43f839df981dda5859e8e075067a360; 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c up to, but not including, 104212471b1c1817b311771d817fb692af983173; and 1 more ranges | 7470a4314b239e9a9580f248fdf4c9a92805490e, 09cf99bace7789d91caa8d10fbcfc8b2fb35857f, e5b3dd2d92c4511e81f6e4ec9c5bb7ad25e03d13, f5d46f1b47f65da1faf468277b261eb78c8e25b5, 5d8325fd15892c8ab1146edc1d7ed8463de39636, d9b94c3ace549433de8a93eeb27b0391fc8ac406 |
| Linux | Linux Kernel | 4.1 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.138; 5.11 up to, but not including, 5.15.63; 5.16 up to, but not including, 5.19.4 | 4.9.326, 4.14.291, 4.19.256, 5.4.211, 5.10.138, 5.15.63 |
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.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.8 | High | CNA |
| CVSS 3.1 | 7.8 | High | NVD |
Official description
In the Linux kernel, the following vulnerability has been resolved: drivers:md:fix a potential use-after-free bug In line 2884, "raid5_release_stripe(sh);" drops the reference to sh and may cause sh to be released. However, sh is subsequently used in lines 2886 "if (sh->batch_head && sh != sh->batch_head)". This may result in an use-after-free bug. It can be fixed by moving "raid5_release_stripe(sh);" to the bottom of the function.
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.
Timeline
- CVE record published.
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- git.kernel.org/stable/c/09cf99bace7789d91caa8d10fbcfc8b2fb35857f
- git.kernel.org/stable/c/104212471b1c1817b311771d817fb692af983173
- git.kernel.org/stable/c/5d8325fd15892c8ab1146edc1d7ed8463de39636
- git.kernel.org/stable/c/7470a4314b239e9a9580f248fdf4c9a92805490e
- git.kernel.org/stable/c/d9b94c3ace549433de8a93eeb27b0391fc8ac406
- git.kernel.org/stable/c/e5b3dd2d92c4511e81f6e4ec9c5bb7ad25e03d13
- git.kernel.org/stable/c/eb3a4f73f43f839df981dda5859e8e075067a360
- git.kernel.org/stable/c/f5d46f1b47f65da1faf468277b261eb78c8e25b5
Recent Use After Free vulnerabilities
- 8.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
Spotted an error? Tell us.