CVE-2021-47624

net/sunrpc: fix reference count leaks in rpc_sysfs_xprt_state_change

No CVSS score yet EPSS 0.24%

Published 16 Jul 2024 Updated 11 May 2026 CNA: Linux

Check your servers for CVE-2021-47624

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2021-47624 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

In the Linux kernel, the following vulnerability has been resolved:

net/sunrpc: fix reference count leaks in rpc_sysfs_xprt_state_change

The refcount leak issues take place in an error handling path. When the 3rd argument buf doesn't match with "offline", "online" or "remove", the function simply returns -EINVAL and forgets to decrease the reference count of a rpc_xprt object and a rpc_xprt_switch object increased by rpc_sysfs_xprt_kobj_get_xprt() and rpc_sysfs_xprt_kobj_get_xprt_switch(), causing reference count leaks of both unused objects.

Fix this issue by jumping to the error handling path labelled with out_put when buf matches none of "offline", "online" or "remove".

Exploitation

EPSS 0.24%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 15.7% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 10 Sep 2024):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 5b7eb78486cd9ac58bfbd6d84ea0fe2d9fead03b, before 4b22aa42bd4d2d630ef1854c139275c3532937cb
affected from 5b7eb78486cd9ac58bfbd6d84ea0fe2d9fead03b, before 5f6024c05a2c0fdd180b29395aaf686d25af3a0f
affected from 5b7eb78486cd9ac58bfbd6d84ea0fe2d9fead03b, before 776d794f28c95051bc70405a7b1fa40115658a18
Other versions: unaffected
Linux
affected 5.14
unaffected before 5.14
unaffected from 5.15.24 up to and including 5.15.*
unaffected from 5.16.10 up to and including 5.16.*
unaffected 5.17 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2021-47624 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2021-47624

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2021-47624
trivy image --scanners vuln IMAGE | grep CVE-2021-47624

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2021-47624 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.