# CVE-2021-47668: can: dev: can_restart: fix use after free bug

- Severity: High 8.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.24%, higher than 16% of CVEs (2026-12-01)
- Published: 2025-04-17T18:01:29.315Z
- Modified: 2026-08-05T08:48:48.169Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from 39549eef3587f1c1e8c65c88a2400d10fd30ea17 before 260925a0b7d2da5449f8ecfd02c1405e0c8a45b8; from 39549eef3587f1c1e8c65c88a2400d10fd30ea17 before bbc6847b9b8978b520f62fbc7c68c54ef0f8d282; from 39549eef3587f1c1e8c65c88a2400d10fd30ea17 before 92668d28c7e6a7a2ba07df287669ffcdf650c421; from 39549eef3587f1c1e8c65c88a2400d10fd30ea17 before 08ab951787098ae0b6c0364aeea7a8138226f234; from 39549eef3587f1c1e8c65c88a2400d10fd30ea17 before ac48ef15826e83f4206c47add61072e8fc76d328; from 39549eef3587f1c1e8c65c88a2400d10fd30ea17 before 593c072b7b3c4d7044416eb039d9ad706bedd67a; from 39549eef3587f1c1e8c65c88a2400d10fd30ea17 before 03f16c5075b22c8902d2af739969e878b0879c94; 2.6.31 (not affected: before 2.6.31; from 4.4.254 up to 4.4.*; from 4.9.254 up to 4.9.*; from 4.14.218 up to 4.14.*; from 4.19.171 up to 4.19.*; from 5.4.93 up to 5.4.*; from 5.10.11 up to 5.10.*; from 5.11 up to *)
- linux linux_kernel: from 2.6.31 before 4.4.254; from 4.5 before 4.9.254; from 4.10 before 4.14.218; from 4.15 before 4.19.171; from 4.20 before 5.4.93; from 5.5 before 5.10.11; 5.11

## Every score

- Linux: CVSS:3.1 8.8 High `CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- CISA-ADP: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/260925a0b7d2da5449f8ecfd02c1405e0c8a45b8> (patch)
- <https://git.kernel.org/stable/c/bbc6847b9b8978b520f62fbc7c68c54ef0f8d282> (patch)
- <https://git.kernel.org/stable/c/92668d28c7e6a7a2ba07df287669ffcdf650c421> (patch)
- <https://git.kernel.org/stable/c/08ab951787098ae0b6c0364aeea7a8138226f234> (patch)
- <https://git.kernel.org/stable/c/ac48ef15826e83f4206c47add61072e8fc76d328> (patch)
- <https://git.kernel.org/stable/c/593c072b7b3c4d7044416eb039d9ad706bedd67a> (patch)
- <https://git.kernel.org/stable/c/03f16c5075b22c8902d2af739969e878b0879c94> (patch)

## Sources

- CVE List: [CVE-2021-47668](https://www.cve.org/CVERecord?id=CVE-2021-47668), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2021-47668](https://nvd.nist.gov/vuln/detail/CVE-2021-47668), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2021-47668 · Whole record: https://cve.day/CVE-2021-47668.json · Rebuilt by cve.day 2026-11-25T22:58:09.014Z
