CVE-2021-47668
kernel: can: dev: can_restart: fix use after free bug
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · April 17, 2025
Updated · October 30, 2026
Description
In the Linux kernel, the following vulnerability has been resolved:
can: dev: can_restart: fix use after free bug
After calling netif_rx_ni(skb), dereferencing skb is unsafe. Especially, the can_frame cf which aliases skb memory is accessed after the netif_rx_ni() in: stats->rx_bytes += cf->len;
Reordering the lines solves the issue.
Statement
This vulnerability is rated as Moderate impact because exploitation requires local access and is constrained to environments utilizing Controller Area Network (CAN) devices. The flaw resides in the CAN device restart handler, where memory is referenced after being released during network packet processing, potentially leading to a kernel crash and system denial of service. Typical enterprise server deployments do not utilize CAN hardware interfaces, which significantly limits practical exposure.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CWE-416 · Use After Free