CVE-2021-47231: can: mcba_usb: fix memory leak in mcba_usb
In the Linux kernel, the following vulnerability has been resolved:
can: mcba_usb: fix memory leak in mcba_usb
Syzbot reported memory leak in SocketCAN driver for Microchip CAN BUS
Analyzer Tool. The problem was in unfreed usb_coherent.
In mcba_usb_start() 20 coherent buffers are allocated and there is
nothing, that frees them:
1) In callback function the urb is resubmitted and that's all
2) In disconnect function urbs are simply killed, but URB_FREE_BUFFER
is not set (see mcba_usb_start) and this flag cannot be used with
coherent buffers.
Fail log:
| [ 1354.053291][ T8413] mcba_usb 1-1:0.0 can0: device disconnected
| [ 1367.059384][ T8420] kmemleak: 20 new suspected memory leaks (see /sys/kernel/debug/kmem)
So, all allocated buffers should be freed with usb_free_coherent()
explicitly
NOTE:
The same pattern for allocating and freeing coherent buffers
is used in drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c
Security readout for executives and security teams
Plain-English summary
CVE-2021-47231 is a Linux kernel memory leak in the mcba_usb SocketCAN driver for the Microchip CAN BUS Analyzer Tool. Repeated device use or disconnect handling could consume kernel memory and affect availability. The source bundle does not report data theft, privilege escalation, or active exploitation.
Executive priority
Treat as a targeted availability risk, not a broad internet emergency. Patch during normal kernel maintenance, faster for systems where local users or devices are less controlled and CAN tooling is operationally important.
Technical view
mcba_usb_start() allocated 20 USB coherent buffers, but disconnect handling killed URBs without explicitly freeing those buffers. Because URB_FREE_BUFFER cannot be used for coherent buffers, the fix frees them with usb_free_coherent(). CVSS is 5.5: local, low complexity, low privileges, availability impact only.
Likely exposure
Exposure is most likely on Linux systems with affected kernel versions and the mcba_usb driver used with Microchip CAN BUS Analyzer hardware. General servers without this driver or hardware path are less likely exposed, but embedded, automotive, industrial, or lab systems using SocketCAN need review.
Exploitation context
The bundle cites syzbot reporting kmemleak findings after device disconnect. KEV is false, and the provided sources do not claim active exploitation or public weaponization. Practical abuse appears local and availability-focused, consistent with the CVSS vector.
Researcher notes
Evidence is specific to Linux mcba_usb coherent buffer cleanup. The sources identify root cause and stable commits, but do not provide distribution package mappings, exploit reports, or broader affected hardware beyond the Microchip CAN BUS Analyzer Tool.
Mitigation direction
Update to a kernel or distro package containing the referenced stable fixes.
Check Linux distribution advisories for exact fixed package versions.
Prioritize systems using SocketCAN with Microchip CAN BUS Analyzer hardware.
Limit local user and physical USB access on exposed systems.
Remove or disable unused CAN USB driver support where operationally acceptable.
Validation and detection
Inventory kernel versions against affected and fixed distro releases.
Check whether mcba_usb is present, loaded, or packaged on relevant systems.
Confirm Microchip CAN BUS Analyzer usage in labs, vehicles, or industrial environments.
Review kernel update status for the referenced stable commits.
Monitor for unexplained memory pressure on systems using the device.
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.
cve · low confidence lookup
CVE-2021-47231 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
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.