CVE-2021-47519
published high CVSS 3.1 · 7.5can: m_can: m_can_read_fifo: fix memory leak in error branch
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linuxe39381770ec9ca3c51d8b9bd9cc6e01d78ea974a to < 75a422165477dd12d2d20aa7c9ee7c9a281c9908 · e39381770ec9ca3c51d8b9bd9cc6e01d78ea974a to < 31cb32a590d62b18f69a9a6d433f4e69c74fdd56 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux5.15 (affected) · 0 to < 5.15 (unaffected · semver) · 5.15.8 through 5.15.* (unaffected · semver) · 5.16 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| linux | — | linux_kernele39381770ec9 to < 75a422165477 · Other versions: unknown | Affected | Not stated | CISA-ADP |
| linux | — | linux_kernele39381770ec9 to < 31cb32a590d6 · Other versions: unknown | Affected | Not stated | CISA-ADP |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| linux | — | linux_kernel0 to < 5.15 · Other versions: unknown | Unaffected | Not stated | CISA-ADP |
| linux | — | linux_kernel5.15.8 to < 5.16 · Other versions: unknown | Unaffected | Not stated | CISA-ADP |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.5 / 10
- Severity
- high
- Provider
- CISA-ADP · adp
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | e39381770ec9ca3c51d8b9bd9cc6e01d78ea974a to < 75a422165477dd12d2d20aa7c9ee7c9a281c9908 (affected · git)e39381770ec9ca3c51d8b9bd9cc6e01d78ea974a to < 31cb32a590d62b18f69a9a6d433f4e69c74fdd56 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 5.15 (affected)0 to < 5.15 (unaffected · semver)5.15.8 through 5.15.* (unaffected · semver)5.16 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
| linux | linux_kernel | e39381770ec9 to < 75a422165477 (affected · custom)Default: unknown | CISA-ADP · adp |
| linux | linux_kernel | e39381770ec9 to < 31cb32a590d6 (affected · custom)Default: unknown | CISA-ADP · adp |
| linux | linux_kernel | 0 to < 5.15 (unaffected · custom)Default: unknown | CISA-ADP · adp |
| linux | linux_kernel | 5.15.8 to < 5.16 (unaffected · custom)Default: unknown | CISA-ADP · adp |
| linux | linux_kernel | 5.16 (unaffected)Default: unknown | CISA-ADP · adp |
| linux | linux_kernel | 5.15 (affected)Default: unknown | CISA-ADP · adp |
Weaknesses
1- CWE-401 CWE-401 Missing Release of Memory after Effective Lifetime
References
2Provider assertions
3Linux · cna
can: m_can: m_can_read_fifo: fix memory leak in error branch
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 70d77a410d55a031723e95c07dbe8f15d346640018ae45b6199853025dbfa53d
- Ingested
- 23 Sep 2026, 07:57:11 UTC
- Source record
- Official CVE record