Linux: Use After Free
CVE-2022-50034 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 e65d9b7147d7be3504893ca7dfb85286bda83d40, 6d7ac60098b206d0472475b666cb09d556bec03d, c3c1dbad3a2db32ecf371c97f2058491b8ba0f9a 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.21% 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 e65d9b7147d7be3504893ca7dfb85286bda83d40 or 6d7ac60098b206d0472475b666cb09d556bec03d or c3c1dbad3a2db32ecf371c97f2058491b8ba0f9a or 6fd50446e7c9a98b4bcf96815f5c9602a16ea472, whichever matches your release line, or a later version.
- Update Linux Kernel to 5.4.211 or 5.10.138 or 5.15.63 or 5.19.4, whichever matches your release line, or a later version.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Linux | Linux | 6bbf87a131edd39040974f3843ff97e89310ebde up to, but not including, e65d9b7147d7be3504893ca7dfb85286bda83d40; 6bbf87a131edd39040974f3843ff97e89310ebde up to, but not including, 6d7ac60098b206d0472475b666cb09d556bec03d; 6bbf87a131edd39040974f3843ff97e89310ebde up to, but not including, c3c1dbad3a2db32ecf371c97f2058491b8ba0f9a; 6bbf87a131edd39040974f3843ff97e89310ebde up to, but not including, 6fd50446e7c9a98b4bcf96815f5c9602a16ea472; 6bbf87a131edd39040974f3843ff97e89310ebde up to, but not including, 7d602f30149a117eea260208b1661bc404c21dfd; 5.4 | e65d9b7147d7be3504893ca7dfb85286bda83d40, 6d7ac60098b206d0472475b666cb09d556bec03d, c3c1dbad3a2db32ecf371c97f2058491b8ba0f9a, 6fd50446e7c9a98b4bcf96815f5c9602a16ea472, 7d602f30149a117eea260208b1661bc404c21dfd |
| Linux | Linux Kernel | 5.3 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 | 5.4.211, 5.10.138, 5.15.63, 5.19.4 |
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: usb: cdns3 fix use-after-free at workaround 2 BUG: KFENCE: use-after-free read in __list_del_entry_valid+0x10/0xac cdns3_wa2_remove_old_request() { ... kfree(priv_req->request.buf); cdns3_gadget_ep_free_request(&priv_ep->endpoint, &priv_req->request); list_del_init(&priv_req->list); ^^^ use after free ... } cdns3_gadget_ep_free_request() free the space pointed by priv_req, but priv_req is used in the following list_del_init(). This patch move list_del_init() before cdns3_gadget_ep_free_request().
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/6d7ac60098b206d0472475b666cb09d556bec03d
- git.kernel.org/stable/c/6fd50446e7c9a98b4bcf96815f5c9602a16ea472
- git.kernel.org/stable/c/7d602f30149a117eea260208b1661bc404c21dfd
- git.kernel.org/stable/c/c3c1dbad3a2db32ecf371c97f2058491b8ba0f9a
- git.kernel.org/stable/c/e65d9b7147d7be3504893ca7dfb85286bda83d40
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.