Linux: Use After Free
CVE-2022-50367 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 d1ff475d7c83289d0a7faef346ea3bbf90818bad, c0aa76b0f17f59dd9c9d3463550a2986a1d592e4, ec2aab115eb38ac4992ea2fcc2a02fbe7af5cf48 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.22% 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 d1ff475d7c83289d0a7faef346ea3bbf90818bad or c0aa76b0f17f59dd9c9d3463550a2986a1d592e4 or ec2aab115eb38ac4992ea2fcc2a02fbe7af5cf48 or 70e4f70d54e0225f91814e8610477d65f33cefe4, whichever matches your release line, or a later version.
- Update Linux Kernel to 4.9.331 or 4.14.296 or 4.19.262 or 5.4.218, whichever matches your release line, or a later version.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Linux | Linux | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 up to, but not including, d1ff475d7c83289d0a7faef346ea3bbf90818bad; 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 up to, but not including, c0aa76b0f17f59dd9c9d3463550a2986a1d592e4; 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 up to, but not including, ec2aab115eb38ac4992ea2fcc2a02fbe7af5cf48; 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 up to, but not including, 70e4f70d54e0225f91814e8610477d65f33cefe4; 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 up to, but not including, 1e555c3ed1fce4b278aaebe18a64a934cece57d8; 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 up to, but not including, 64b79e632869ad3ef6c098a4731d559381da1115; 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 up to, but not including, 81de80330fa6907aec32eb54c5619059e6e36452; 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 up to, but not including, 2a96b532098284ecf8e4849b8b9e5fc7a28bdee9; and 2 more ranges | d1ff475d7c83289d0a7faef346ea3bbf90818bad, c0aa76b0f17f59dd9c9d3463550a2986a1d592e4, ec2aab115eb38ac4992ea2fcc2a02fbe7af5cf48, 70e4f70d54e0225f91814e8610477d65f33cefe4, 1e555c3ed1fce4b278aaebe18a64a934cece57d8, 64b79e632869ad3ef6c098a4731d559381da1115 |
| Linux | Linux Kernel | before 4.9.331; 4.10 up to, but not including, 4.14.296; 4.15 up to, but not including, 4.19.262; 4.20 up to, but not including, 5.4.218; 5.5 up to, but not including, 5.10.148; 5.11 up to, but not including, 5.15.73; 5.16 up to, but not including, 5.19.15; 6.0 up to, but not including, 6.0.1 | 4.9.331, 4.14.296, 4.19.262, 5.4.218, 5.10.148, 5.15.73 |
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: fs: fix UAF/GPF bug in nilfs_mdt_destroy In alloc_inode, inode_init_always() could return -ENOMEM if security_inode_alloc() fails, which causes inode->i_private uninitialized. Then nilfs_is_metadata_file_inode() returns true and nilfs_free_inode() wrongly calls nilfs_mdt_destroy(), which frees the uninitialized inode->i_private and leads to crashes(e.g., UAF/GPF). Fix this by moving security_inode_alloc just prior to this_cpu_inc(nr_inodes)
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/1e555c3ed1fce4b278aaebe18a64a934cece57d8
- git.kernel.org/stable/c/2a96b532098284ecf8e4849b8b9e5fc7a28bdee9
- git.kernel.org/stable/c/2e488f13755ffbb60f307e991b27024716a33b29
- git.kernel.org/stable/c/64b79e632869ad3ef6c098a4731d559381da1115
- git.kernel.org/stable/c/70e4f70d54e0225f91814e8610477d65f33cefe4
- git.kernel.org/stable/c/81de80330fa6907aec32eb54c5619059e6e36452
- git.kernel.org/stable/c/c0aa76b0f17f59dd9c9d3463550a2986a1d592e4
- git.kernel.org/stable/c/d1ff475d7c83289d0a7faef346ea3bbf90818bad
- git.kernel.org/stable/c/ec2aab115eb38ac4992ea2fcc2a02fbe7af5cf48
Recent Use After Free vulnerabilities
- 7.8 High severity
- 7.8 High severity
- 7.0 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
Spotted an error? Tell us.