Linux: Use After Free
CVE-2022-50417 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 0b70f6ea4d4f2b4d4b291d86ab76b4d07394932c, 4f1105ee72d8c7c35d90e3491b31b2d9d6b7e33a, 3f9feffa8a5ab08b4e298a27b1aa7204a7d42ca2 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.16% 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 0b70f6ea4d4f2b4d4b291d86ab76b4d07394932c or 4f1105ee72d8c7c35d90e3491b31b2d9d6b7e33a or 3f9feffa8a5ab08b4e298a27b1aa7204a7d42ca2 or ba3d2c2380e7129b525a787489c0b7e819a3b898, whichever matches your release line, or a later version.
- Update Linux Kernel to 5.10.163 or 5.15.87 or 6.0.19 or 6.1.5, whichever matches your release line, or a later version.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Linux | Linux | f3ba91228e8e917e5bd6c4b72bfe846933d17370 up to, but not including, 0b70f6ea4d4f2b4d4b291d86ab76b4d07394932c; f3ba91228e8e917e5bd6c4b72bfe846933d17370 up to, but not including, 4f1105ee72d8c7c35d90e3491b31b2d9d6b7e33a; f3ba91228e8e917e5bd6c4b72bfe846933d17370 up to, but not including, 3f9feffa8a5ab08b4e298a27b1aa7204a7d42ca2; f3ba91228e8e917e5bd6c4b72bfe846933d17370 up to, but not including, ba3d2c2380e7129b525a787489c0b7e819a3b898; f3ba91228e8e917e5bd6c4b72bfe846933d17370 up to, but not including, 4217c6ac817451d5116687f3cc6286220dc43d49; 5.2 | 0b70f6ea4d4f2b4d4b291d86ab76b4d07394932c, 4f1105ee72d8c7c35d90e3491b31b2d9d6b7e33a, 3f9feffa8a5ab08b4e298a27b1aa7204a7d42ca2, ba3d2c2380e7129b525a787489c0b7e819a3b898, 4217c6ac817451d5116687f3cc6286220dc43d49 |
| Linux | Linux Kernel | 5.2 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.19; 6.1 up to, but not including, 6.1.5; 6.2 | 5.10.163, 5.15.87, 6.0.19, 6.1.5 |
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 | NVD |
| CVSS 3.1 | 7.8 | High | CISA (ADP) |
Official description
In the Linux kernel, the following vulnerability has been resolved: drm/panfrost: Fix GEM handle creation ref-counting panfrost_gem_create_with_handle() previously returned a BO but with the only reference being from the handle, which user space could in theory guess and release, causing a use-after-free. Additionally if the call to panfrost_gem_mapping_get() in panfrost_ioctl_create_bo() failed then a(nother) reference on the BO was dropped. The _create_with_handle() is a problematic pattern, so ditch it and instead create the handle in panfrost_ioctl_create_bo(). If the call to panfrost_gem_mapping_get() fails then this means that user space has indeed gone behind our back and freed the handle. In which case just return an error code.
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.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- git.kernel.org/stable/c/0b70f6ea4d4f2b4d4b291d86ab76b4d07394932c
- git.kernel.org/stable/c/3f9feffa8a5ab08b4e298a27b1aa7204a7d42ca2
- git.kernel.org/stable/c/4217c6ac817451d5116687f3cc6286220dc43d49
- git.kernel.org/stable/c/4f1105ee72d8c7c35d90e3491b31b2d9d6b7e33a
- git.kernel.org/stable/c/ba3d2c2380e7129b525a787489c0b7e819a3b898
Recent Use After Free vulnerabilities
- 7.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.