CVE-2021-47519: can: m_can: m_can_read_fifo: fix memory leak in error branch
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.
Security readout for executives and security teams
Plain-English summary
This Linux kernel issue leaks memory in the m_can CAN driver when a FIFO read error path is hit. The reported impact is availability only: repeated failures could consume memory and degrade or crash affected systems. It matters most for Linux deployments using CAN hardware or the m_can driver.
Executive priority
Treat as high priority for embedded, automotive, industrial, or appliance Linux systems using CAN. For general servers without CAN or the m_can driver, urgency is lower but should still follow normal kernel patching cadence.
Technical view
CVE-2021-47519 is a CWE-401 memory leak in m_can_read_fifo(). If a second m_can_fifo_read() call fails, the function exits without freeing the skb allocated by alloc_can_skb(). The fix adds cleanup logic to destroy the skb on that error path.
Likely exposure
Exposure appears limited to Linux kernels in the affected 5.15/5.16-era ranges that include and use the m_can CAN driver. The source bundle does not show impact for systems without this driver or CAN functionality enabled.
Exploitation context
CISA KEV status is false in the provided bundle, and no cited source states active exploitation. The CVSS vector rates this as network-accessible, low-complexity, unauthenticated, and availability-impacting, but the sources do not provide exploit details.
Researcher notes
The source evidence is concise: it identifies a missing skb free on an error branch and references stable kernel commits. It does not establish a practical exploit path, affected distributions, or active attacks, so validation should focus on kernel version and driver presence.
Mitigation direction
Apply Linux vendor kernel updates containing the referenced stable fixes.
Prioritize systems using CAN hardware or the m_can driver.
Check distribution advisories for fixed kernel package versions.
Reboot into the updated kernel after patching where required.
If patching is delayed, review vendor guidance for driver-specific risk reduction.
Validation and detection
Inventory running kernel versions across Linux assets.
Check whether the m_can driver is enabled, built, or loaded.
Verify the kernel includes fix commit 75a422165477dd12d2d20aa7c9ee7c9a281c9908 or equivalent.
Verify the kernel includes fix commit 31cb32a590d62b18f69a9a6d433f4e69c74fdd56 or equivalent.
Review monitoring for unexplained memory pressure on CAN-enabled systems.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-401: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-401 · source CWE mapping
Missing Release of Memory after Effective Lifetime
Missing Release of Memory after Effective Lifetime represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.