CVE-2021-47249

Medium

Description

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, &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() { 1) 3.721 us | rds_inc_addref(); 1) 3.853 us | rds_message_inc_copy_to_user(); 1) + 10.395 us | rds_cmsg_recv(); 1) + 34.260 us | }

SeverityMedium
CVSS5.5
Exploit probability—
ProductLinux Kernel
PublishedMay 21, 2024
First seenMay 21, 2024

How to fix

Update
  • linux linux_kernel4.4.274, 4.9.274, 4.14.238, 4.19.196, 5.4.128, 5.10.46, 5.12.13 or later

Affected products

ProductAffected versionsFixed in
linux linux_kernel2.6.30 ≤ v < 4.4.274, 4.5 ≤ v < 4.9.274, 4.10 ≤ v < 4.14.238, 4.15 ≤ v < 4.19.196, 4.20 ≤ v < 5.4.128, 5.5 ≤ v < 5.10.46, 5.11 ≤ v < 5.12.13, 5.134.4.274, 4.9.274, 4.14.238, 4.19.196, 5.4.128, 5.10.46, 5.12.13

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.