CVE-2022-49890 Details
Description
In the Linux kernel, the following vulnerability has been resolved: capabilities: fix potential memleak on error path from vfs_getxattr_alloc() In cap_inode_getsecurity(), we will use vfs_getxattr_alloc() to complete the memory allocation of tmpbuf, if we have completed the memory allocation of tmpbuf, but failed to call handler->get(...), there will be a memleak in below logic: |-- ret = (int)vfs_getxattr_alloc(mnt_userns, ...) | /* ^^^ alloc for tmpbuf */ |-- value = krealloc(*xattr_value, error + 1, flags) | /* ^^^ alloc memory */ |-- error = handler->get(handler, ...) | /* error! */ |-- *xattr_value = value | /* xattr_value is &tmpbuf (memory leak!) */ So we will try to free(tmpbuf) after vfs_getxattr_alloc() fails to fix it. [PM: subject line and backtrace tweaks]
A memory leak vulnerability has been identified in the Linux kernel's capabilities management, specifically within the 'cap_inode_getsecurity()' function. The issue arises when 'vfs_getxattr_alloc()' is used to allocate memory for an attribute buffer. If the memory allocation is successful but the corresponding handler function fails to execute properly, the allocated memory is not freed, leading to a leak. This vulnerability has been addressed by modifying the error handling to ensure that the allocated memory is properly released in such scenarios.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Oct 1, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://git.kernel.org/stable/c/0c3e6288da650d1ec911a259c77bc2d88e498603 | kernel.org | Patch |
| https://git.kernel.org/stable/c/2de8eec8afb75792440b8900a01d52b8f6742fd1 | kernel.org | Patch |
| https://git.kernel.org/stable/c/6bb00eb21c0fbf18e5d3538c9ff0cf63fd0ace85 | kernel.org | Patch |
| https://git.kernel.org/stable/c/7480aeff0093d8c54377553ec6b31110bea37b4d | kernel.org | Patch |
| https://git.kernel.org/stable/c/8cf0a1bc12870d148ae830a4ba88cfdf0e879cee | kernel.org | Patch |
| https://git.kernel.org/stable/c/90577bcc01c4188416a47269f8433f70502abe98 | kernel.org | Patch |
| https://git.kernel.org/stable/c/cdf01c807e974048c43c7fd3ca574f6086a57906 | kernel.org | Patch |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-401 | Missing Release of Memory after Effective Lifetime | [email protected] |
| CWE-401 | Missing Release of Memory after Effective Lifetime | CISA-ADP |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 4.14, < 4.14.299 >= 4.15, < 4.19.265 >= 4.20, < 5.4.224 >= 5.5, < 5.10.154 >= 5.11, < 5.15.78 >= 5.16, < 6.0.8 6.1 rc1 6.1 rc2 6.1 rc3 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | kernel.org |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Oct 1, 2025 | CVE Modified | CISA-ADP |
| May 7, 2025 | Initial Analysis | [email protected] |
| May 1, 2025 | New CVE Received | kernel.org |