CVE-2021-47231
can: mcba_usb: fix memory leak in mcba_usb
Mitigation
- Upgrade Linux to 91c02557174be7f72e46ed7311e3bea1939840b0 or later.
Who should check
- Anyone running Linux >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < 89df95ce32be204eef2e7d4b2f6fb552fb191a68; >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < a115198caaab6d663bef75823a3c5f0802306d60; >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < 6f87c0e21ad20dd3d22108e33db1c552dfa352a0; >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < 6bd3d80d1f019cefa7011056c54b323f1d8b8e83; >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < d0760a4ef85697bc756d06eae17ae27f3f055401; >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < 91c02557174be7f72e46ed7311e3bea1939840b0
- Anyone running Linux 4.12
Vulnerability facts
- Affected
- Linux >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < 89df95ce32be204eef2e7d4b2f6fb552fb191a68; >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < a115198caaab6d663bef75823a3c5f0802306d60; >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < 6f87c0e21ad20dd3d22108e33db1c552dfa352a0; >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < 6bd3d80d1f019cefa7011056c54b323f1d8b8e83; >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < d0760a4ef85697bc756d06eae17ae27f3f055401; >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < 91c02557174be7f72e46ed7311e3bea1939840b0; Linux 4.12
- Fixed in
- Linux 89df95ce32be204eef2e7d4b2f6fb552fb191a68, Linux 6f87c0e21ad20dd3d22108e33db1c552dfa352a0, Linux 6bd3d80d1f019cefa7011056c54b323f1d8b8e83, Linux 91c02557174be7f72e46ed7311e3bea1939840b0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 5.5 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: High
- EPSS
- 0.31% chance of exploitation in 30 days (percentile 16, 2026-11-26)
- CWE
- CWE-401
- Modified
Description
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
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < 89df95ce32be204eef2e7d4b2f6fb552fb191a68; >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < a115198caaab6d663bef75823a3c5f0802306d60; >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < 6f87c0e21ad20dd3d22108e33db1c552dfa352a0; >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < 6bd3d80d1f019cefa7011056c54b323f1d8b8e83; >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < d0760a4ef85697bc756d06eae17ae27f3f055401; >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < 91c02557174be7f72e46ed7311e3bea1939840b0 | — | cvelist |
| Linux | 4.12 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2021-47231. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2021-47231.md Affected: Linux >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < 89df95ce32be204eef2e7d4b2f6fb552fb191a68; >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < a115198caaab6d663bef75823a3c5f0802306d60; >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < 6f87c0e21ad20dd3d22108e33db1c552dfa352a0; >= 51f3baad7de943780ce0c17… Fixed in: Linux 89df95ce32be204eef2e7d4b2f6fb552fb191a68, Linux 6f87c0e21ad20dd3d22108e33db1c552dfa352a0, Linux 6bd3d80d1f019cefa7011056c54b323f1d8b8e83, Linux 91c02557174be7f72e46ed7311e3bea1939840b0 Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Patches
- https://git.kernel.org/stable/c/89df95ce32be204eef2e7d4b2f6fb552fb191a68
- https://git.kernel.org/stable/c/a115198caaab6d663bef75823a3c5f0802306d60
- https://git.kernel.org/stable/c/6f87c0e21ad20dd3d22108e33db1c552dfa352a0
- https://git.kernel.org/stable/c/6bd3d80d1f019cefa7011056c54b323f1d8b8e83
- https://git.kernel.org/stable/c/d0760a4ef85697bc756d06eae17ae27f3f055401
- https://git.kernel.org/stable/c/91c02557174be7f72e46ed7311e3bea1939840b0
FAQ
Is CVE-2021-47231 being exploited?
There is no confirmed exploitation: CVE-2021-47231 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2021-47231?
Medium: CVSS 5.5 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2021-47231?
Linux >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < 89df95ce32be204eef2e7d4b2f6fb552fb191a68; >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < a115198caaab6d663bef75823a3c5f0802306d60; >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < 6f87c0e21ad20dd3d22108e33db1c552dfa352a0; >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < 6bd3d80d1f019cefa7011056c54b323f1d8b8e83; >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < d0760a4ef85697bc756d06eae17ae27f3f055401; >= 51f3baad7de943780ce0c17bd7975df567dd6e14, < 91c02557174be7f72e46ed7311e3bea1939840b0; Linux 4.12.
Is there a fix for CVE-2021-47231?
Yes. Fixed in Linux 89df95ce32be204eef2e7d4b2f6fb552fb191a68, Linux 6f87c0e21ad20dd3d22108e33db1c552dfa352a0, Linux 6bd3d80d1f019cefa7011056c54b323f1d8b8e83, Linux 91c02557174be7f72e46ed7311e3bea1939840b0. Upgrade Linux to 91c02557174be7f72e46ed7311e3bea1939840b0 or later.
How do I check if I'm affected by CVE-2021-47231?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.