CVE-2021-47671 can: etas_es58x: es58x_rx_err_msg(): fix memory leak in error path
A memory leak in the Linux kernel CAN driver allows attackers to exhaust system memory, potentially causing a denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-47671?
CVE-2021-47671 is a low-severity denial of service vulnerability in Linux kernel, published on 17 Apr 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
can: etas_es58x: es58x_rx_err_msg(): fix memory leak in error path
In es58x_rx_err_msg(), if can->do_set_mode() fails, the function directly returns without calling netif_rx(skb). This means that the skb previously allocated by alloc_can_err_skb() is not freed. In other terms, this is a memory leak.
This patch simply removes the return statement in the error branch and let the function continue.
Issue was found with GCC -fanalyzer, please follow the link below for details.
Weakness: CWE-401
Which versions are affected by CVE-2021-47671?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2021-47671?
Apply the vendor's patch.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2021-47671 being exploited?
There is no known exploitation of CVE-2021-47671 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2021-47671, GHSA-fgr8-gcxj-6pq5, UBUNTU-CVE-2021-47671.