CVE-2021-47521·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: can: sja1000: fix use after free in ems_pcmcia_add_card() If the last channel is not available then "dev" is freed. Fortunately, we can just use "pdev->irq" instead. Also we should check if at least one channel was set up.
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.15.8
- Published
- 2024-05-24
Affected versions
From: 5.11
Until: 5.15.8
Fixed in: 5.15.8
How to fix this CVE
Update your Linux kernel to version 5.15.8 or later to resolve a use-after-free vulnerability in the EMS PCMCIA CAN driver initialization. This flaw could allow local attackers with low privileges to trigger memory corruption by exploiting improper device cleanup during multi-channel setup failure. Prioritize this patch if your system uses EMS PCMCIA CAN interfaces.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Run `uname -r` to check your current kernel version. Versions 5.11 through 5.15.7 are vulnerable.
- Verify if EMS PCMCIA CAN driver is loaded: `lsmod | grep sja1000` or `grep -i 'ems\|sja1000' /proc/modules`
- Check kernel logs for CAN device initialization errors: `dmesg | grep -i 'ems\|can.*error\|sja1000'`
- Confirm patch application by checking if kernel version is 5.15.8 or higher: `uname -r | grep -E '^5\.(1[5-9]|[2-9][0-9]|15\.[8-9]|15\.[1-9][0-9])'
FAQ
What is CVE-2021-47521?
This vulnerability is a use-after-free condition in the EMS PCMCIA CAN driver that occurs when multi-channel device initialization fails, allowing local attackers to cause memory corruption and potentially execute arbitrary code.
Is CVE-2021-47521 being actively exploited?
No, CVE-2021-47521 is not listed in the CISA Known Exploited Vulnerabilities catalog, and no public exploits are currently available.
What versions of Kernel are affected by CVE-2021-47521?
Kernel versions 5.11 through 5.15.7 are affected. Version 5.15.8 and later include the fix.
How do I check if my server is vulnerable to CVE-2021-47521?
Run `uname -r` to get your kernel version. If the output shows a version between 5.11 and 5.15.7, your system is vulnerable. Additionally, check if the EMS PCMCIA driver is in use with `lsmod | grep sja1000`.
Does Defensia detect CVE-2021-47521?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2021-47521 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/1a295fea90e1acbe80c6d4940f5ff856edcd6bec
- https://git.kernel.org/stable/c/1dd5b819f7e406dc15bbc7670596ff25261aaa2a
- https://git.kernel.org/stable/c/3ec6ca6b1a8e64389f0212b5a1b0f6fed1909e45
- https://git.kernel.org/stable/c/474f9a8534f5f89841240a7e978bafd6e1e039ce
- https://git.kernel.org/stable/c/923f4dc5df679f678e121c20bf2fd70f7bf3e288
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-47521. Free for 1 server.
Get started free