CVE-2022-49890: capabilities: fix potential memleak on error path from vfs_getxattr_alloc()

Published May 1, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

capabilities: fix potential memleak on error path from vfsgetxattralloc()

In capinodegetsecurity(), we will use vfsgetxattralloc() 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)vfsgetxattralloc(mntuserns, ...) | / ^^^ alloc for tmpbuf / |-- value = krealloc(xattrvalue, error + 1, flags) | / ^^^ alloc memory / |-- error = handler->get(handler, ...) | / error! / |-- xattrvalue = value | / xattrvalue is &tmpbuf (memory leak!) /

So we will try to free(tmpbuf) after vfsgetxattralloc() fails to fix it.

[PM: subject line and backtrace tweaks]

Affected Software

10 affected components
Linux Linux kernel
Linux Linux kernel>=4.14<4.14.299
Linux Linux kernel>=4.15<4.19.265
Linux Linux kernel>=4.20<5.4.224
Linux Linux kernel>=5.5<5.10.154
Linux Linux kernel>=5.11<5.15.78
Linux Linux kernel>=5.16<6.0.8
Linux Linux kernel=6.1-rc1
Linux Linux kernel=6.1-rc2
Linux Linux kernel=6.1-rc3

Event History

May 1, 2025
CVE Published
via MITRE·02:10 PM
Data Sourced
via MITRE·02:10 PM
Description
Data Sourced
via NVD·03:16 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2022-49890?

The CVE-2022-49890 vulnerability has a low severity rating due to the specific conditions needed for exploitation.

2

How do I fix CVE-2022-49890?

To mitigate CVE-2022-49890, update to the latest version of the Linux Kernel where the vulnerability has been patched.

3

What is the impact of CVE-2022-49890?

CVE-2022-49890 could potentially lead to a memory leak in the Linux kernel during the execution of specific operations.

4

Is CVE-2022-49890 remotely exploitable?

CVE-2022-49890 is not considered to be remotely exploitable as it requires local access to the affected system.

5

What versions of the Linux Kernel are affected by CVE-2022-49890?

CVE-2022-49890 affects multiple versions of the Linux Kernel prior to the security patch release.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203