# CVE-2021-47519: can: m_can: m_can_read_fifo: fix memory leak in error branch

- Severity: High 7.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/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.50%, higher than 44% of CVEs (2026-12-01)
- Published: 2024-05-24T15:09:33.118Z
- Modified: 2026-06-17T04:17:40.800Z
- Weaknesses: CWE-401
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: Linux

## Description

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

can: m_can: m_can_read_fifo: fix memory leak in error branch

In m_can_read_fifo(), if the second call to m_can_fifo_read() fails,
the function jump to the out_fail label and returns without calling
m_can_receive_skb(). This means that the skb previously allocated by
alloc_can_skb() is not freed. In other terms, this is a memory leak.

This patch adds a goto label to destroy the skb if an error occurs.

Issue was found with GCC -fanalyzer, please follow the link below for
details.

(As written by CVE List.)

## Affected

- Linux Linux: from e39381770ec9ca3c51d8b9bd9cc6e01d78ea974a before 75a422165477dd12d2d20aa7c9ee7c9a281c9908; from e39381770ec9ca3c51d8b9bd9cc6e01d78ea974a before 31cb32a590d62b18f69a9a6d433f4e69c74fdd56; 5.15 (not affected: before 5.15; from 5.15.8 up to 5.15.*; from 5.16 up to *)
- linux linux_kernel: from e39381770ec9 before 75a422165477; from e39381770ec9 before 31cb32a590d6; 5.15; from 5.15 before 5.15.8 (not affected: before 5.15; from 5.15.8 before 5.16; 5.16)

## Every score

- CISA-ADP: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/75a422165477dd12d2d20aa7c9ee7c9a281c9908> (patch)
- <https://git.kernel.org/stable/c/31cb32a590d62b18f69a9a6d433f4e69c74fdd56> (patch)

## Sources

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

---

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