# CVE-2021-47249: net: rds: fix memory leak in rds\_recvmsg

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.31% (percentile 16, 2026-11-28)
- **CWE:** CWE-401
- **Published:** 2024-05-21T14:19:46.238Z
- **Modified:** 2026-06-17T04:17:00.713Z

## Who should check

- Anyone running Linux \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< 8c3ec88b03e9e4ca117dcdc4204fd3edcd02084f; \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< 423c6939758fb3b9cf5abbd1e7792068a5c4ae8c; \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< 1f79bc8ae81c05eb112a53f981cb2c244ee50d02; \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< 06b7cb0194bd1ede0dd27f3a946e7c0279fba44a; \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< 2038cd15eacdf7512755c27686822e0052eb9042; \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< 5946fbf48355f5a8caeff72580c7658da5966b86; \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< b25b60d076164edb3025e85aabd2cf50a5215b91; \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< 49bfcbfd989a8f1f23e705759a6bb099de2cff9f
- Anyone running Linux 2.6.30

## 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 and fixed versions

- Linux: \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< 8c3ec88b03e9e4ca117dcdc4204fd3edcd02084f; \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< 423c6939758fb3b9cf5abbd1e7792068a5c4ae8c; \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< 1f79bc8ae81c05eb112a53f981cb2c244ee50d02; \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< 06b7cb0194bd1ede0dd27f3a946e7c0279fba44a; \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< 2038cd15eacdf7512755c27686822e0052eb9042; \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< 5946fbf48355f5a8caeff72580c7658da5966b86; \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< b25b60d076164edb3025e85aabd2cf50a5215b91; \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< 49bfcbfd989a8f1f23e705759a6bb099de2cff9f (cvelist)
- Linux: 2.6.30 (cvelist)

## Mitigation

- Upgrade Linux to 49bfcbfd989a8f1f23e705759a6bb099de2cff9f or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-47249. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-47249.md
Affected: Linux >= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, < 8c3ec88b03e9e4ca117dcdc4204fd3edcd02084f; >= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, < 423c6939758fb3b9cf5abbd1e7792068a5c4ae8c; >= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, < 1f79bc8ae81c05eb112a53f981cb2c244ee50d02; >= bdbe6fbc6a2f2ccfb384b14…
Fixed in: Linux 8c3ec88b03e9e4ca117dcdc4204fd3edcd02084f, Linux 423c6939758fb3b9cf5abbd1e7792068a5c4ae8c, Linux 1f79bc8ae81c05eb112a53f981cb2c244ee50d02, Linux 06b7cb0194bd1ede0dd27f3a946e7c0279fba44a, Linux 2038cd15eacdf7512755c27686822e0052eb9042, Linux 5946fbf48355f5a8caeff72580c7658da5966b86, Linux 49bfc…

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-47249 being exploited?

There is no confirmed exploitation: CVE-2021-47249 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2021-47249?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2021-47249?

Linux \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< 8c3ec88b03e9e4ca117dcdc4204fd3edcd02084f; \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< 423c6939758fb3b9cf5abbd1e7792068a5c4ae8c; \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< 1f79bc8ae81c05eb112a53f981cb2c244ee50d02; \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< 06b7cb0194bd1ede0dd27f3a946e7c0279fba44a; \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< 2038cd15eacdf7512755c27686822e0052eb9042; \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< 5946fbf48355f5a8caeff72580c7658da5966b86; \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< b25b60d076164edb3025e85aabd2cf50a5215b91; \>= bdbe6fbc6a2f2ccfb384b141b257677d2a8d36fb, \< 49bfcbfd989a8f1f23e705759a6bb099de2cff9f; Linux 2.6.30.

### Is there a fix for CVE-2021-47249?

Yes. Fixed in Linux 8c3ec88b03e9e4ca117dcdc4204fd3edcd02084f, Linux 423c6939758fb3b9cf5abbd1e7792068a5c4ae8c, Linux 1f79bc8ae81c05eb112a53f981cb2c244ee50d02, Linux 06b7cb0194bd1ede0dd27f3a946e7c0279fba44a, Linux 2038cd15eacdf7512755c27686822e0052eb9042, Linux 5946fbf48355f5a8caeff72580c7658da5966b86, Linux 49bfcbfd989a8f1f23e705759a6bb099de2cff9f. Upgrade Linux to 49bfcbfd989a8f1f23e705759a6bb099de2cff9f or later.

### How do I check if I'm affected by CVE-2021-47249?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/8c3ec88b03e9e4ca117dcdc4204fd3edcd02084f>
- patch: <https://git.kernel.org/stable/c/423c6939758fb3b9cf5abbd1e7792068a5c4ae8c>
- patch: <https://git.kernel.org/stable/c/1f79bc8ae81c05eb112a53f981cb2c244ee50d02>
- patch: <https://git.kernel.org/stable/c/06b7cb0194bd1ede0dd27f3a946e7c0279fba44a>
- patch: <https://git.kernel.org/stable/c/2038cd15eacdf7512755c27686822e0052eb9042>
- patch: <https://git.kernel.org/stable/c/5946fbf48355f5a8caeff72580c7658da5966b86>
- patch: <https://git.kernel.org/stable/c/b25b60d076164edb3025e85aabd2cf50a5215b91>
- patch: <https://git.kernel.org/stable/c/49bfcbfd989a8f1f23e705759a6bb099de2cff9f>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-47249>

HTML: <https://flawdb.com/CVE-2021-47249> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-47249>
