Resource Leak Affecting perf-debuginfo package, versions <0:4.14.238-182.421.amzn2


Severity

Recommended
high

Based on Amazon Linux security rating.

Threat Intelligence

EPSS
0.05% (15th 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-PERFDEBUGINFO-10264175
  • published30 May 2025
  • disclosed21 May 2024

Introduced: 21 May 2024

CVE-2021-47249  (opens in a new tab)
CWE-402  (opens in a new tab)

How to fix?

Upgrade Amazon-Linux:2 perf-debuginfo to version 0:4.14.238-182.421.amzn2 or higher.
This issue was patched in ALAS2-2021-1685.

NVD Description

Note: Versions mentioned in the description apply only to the upstream perf-debuginfo package and not the perf-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:

net: rds: fix memory leak in rds_recvmsg

Syzbot reported memory leak in rds. The problem was in unputted refcount in case of error.

int rds_recvmsg(struct socket *sock, struct msghdr *msg, size_t size, int msg_flags) { ...

if (!rds_next_incoming(rs, &amp;inc)) {
    ...
}

After this "if" inc refcount incremented and

if (rds_cmsg_recv(inc, msg, rs)) {
    ret = -EFAULT;
    goto out;
}

... out: return ret; }

in case of rds_cmsg_recv() fail the refcount won't be decremented. And it's easy to see from ftrace log, that rds_inc_addref() don't have rds_inc_put() pair in rds_recvmsg() after rds_cmsg_recv()

  1.           |  rds_recvmsg() {
    
  2. 3.721 us | rds_inc_addref();
  3. 3.853 us | rds_message_inc_copy_to_user();
    • 10.395 us | rds_cmsg_recv();
    • 34.260 us | }

CVSS Base Scores

version 3.1