CVE-2021-47249

See a problem?
Source
https://nvd.nist.gov/vuln/detail/CVE-2021-47249
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-47249.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-47249
Related
Published
2024-05-21T15:15:13Z
Modified
2024-09-18T01:00:22Z
Summary
[none]
Details

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 rdsrecvmsg(struct socket *sock, struct msghdr *msg, sizet 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 rdscmsgrecv() fail the refcount won't be decremented. And it's easy to see from ftrace log, that rdsincaddref() don't have rdsincput() pair in rdsrecvmsg() after rdscmsg_recv()

1) | rdsrecvmsg() { 1) 3.721 us | rdsincaddref(); 1) 3.853 us | rdsmessageinccopytouser(); 1) + 10.395 us | rdscmsgrecv(); 1) + 34.260 us | }

References

Affected packages

Debian:11 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.10.46-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:12 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.10.46-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:13 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.10.46-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}