Memory Leak Affecting kernel-tools-debuginfo package, versions <0:4.14.299-223.520.amzn2


Severity

Recommended
high

Based on Amazon Linux security rating.

Threat Intelligence

EPSS
0.19% (9th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-AMZN2-KERNELTOOLSDEBUGINFO-10499690
  • published25 Jun 2025
  • disclosed1 May 2025

Introduced: 1 May 2025

CVE-2022-49890  (opens in a new tab)
CWE-401  (opens in a new tab)

How to fix?

Upgrade Amazon-Linux:2 kernel-tools-debuginfo to version 0:4.14.299-223.520.amzn2 or higher.
This issue was patched in ALAS2-2022-1888.

NVD Description

Note: Versions mentioned in the description apply only to the upstream kernel-tools-debuginfo package and not the kernel-tools-debuginfo package as distributed by Amazon-Linux. See How to fix? for Amazon-Linux:2 relevant fixed versions and status.

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]

CVSS Base Scores

version 3.1