CVE-2021-47249

net: rds: fix memory leak in rds_recvmsg

MEDIUM
5.5
CVSS Score
Published: May 21, 2024 at 02:19 PM UTC
Updated: June 17, 2026 at 04:17 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

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 | }

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

2.6.30 ≤ v < 4.14.2382.6.30 ≤ v < 4.19.1962.6.30 ≤ v < 4.4.2742.6.30 ≤ v < 4.9.2742.6.30 ≤ v < 5.10.462.6.30 ≤ v < 5.12.132.6.30 ≤ v < 5.132.6.30 ≤ v < 5.4.1284.10 ≤ v < 4.14.2384.15 ≤ v < 4.19.1964.20 ≤ v < 5.4.1284.5 ≤ v < 4.9.2745.11 ≤ v < 5.12.135.5 ≤ v < 5.10.465.13 rc15.13 rc25.13 rc35.13 rc45.13 rc55.13 rc6bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb
Vendor states this is fixed in 06b7cb0194bd1ede0dd27f3a946e7c0279fba44a (fixed)
Vendor states this is fixed in 1f79bc8ae81c05eb112a53f981cb2c244ee50d02 (fixed)
Vendor states this is fixed in 2038cd15eacdf7512755c27686822e0052eb9042 (fixed)
Vendor states this is fixed in 423c6939758fb3b9cf5abbd1e7792068a5c4ae8c (fixed)
Vendor states this is fixed in 49bfcbfd989a8f1f23e705759a6bb099de2cff9f (fixed)
Vendor states this is fixed in 5946fbf48355f5a8caeff72580c7658da5966b86 (fixed)
Vendor states this is fixed in 8c3ec88b03e9e4ca117dcdc4204fd3edcd02084f (fixed)
Vendor states this is fixed in b25b60d076164edb3025e85aabd2cf50a5215b91 (fixed)
Vendor states this is fixed in 2.6.30 (unaffected)
Vendor states this is fixed in 4.14.238 (unaffected)
Vendor states this is fixed in 4.19.196 (unaffected)
Vendor states this is fixed in 4.4.274 (unaffected)
Vendor states this is fixed in 4.9.274 (unaffected)
Vendor states this is fixed in 5.10.46 (unaffected)
Vendor states this is fixed in 5.12.13 (unaffected)
Vendor states this is fixed in 5.13 (unaffected)
Vendor states this is fixed in 5.4.128 (unaffected)

References (8)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/06b7cb0194bd1ede0dd27f3a946e7c0279fba44a
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/1f79bc8ae81c05eb112a53f981cb2c244ee50d02
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/2038cd15eacdf7512755c27686822e0052eb9042
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/423c6939758fb3b9cf5abbd1e7792068a5c4ae8c
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/49bfcbfd989a8f1f23e705759a6bb099de2cff9f
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/5946fbf48355f5a8caeff72580c7658da5966b86
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/8c3ec88b03e9e4ca117dcdc4204fd3edcd02084f
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/b25b60d076164edb3025e85aabd2cf50a5215b91

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-401

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card