# CVE-2021-47521: can: sja1000: fix use after free in ems_pcmcia_add_card()

- Severity: High 7.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.24%, higher than 16% of CVEs (2026-12-01)
- Published: 2024-05-24T15:09:34.457Z
- Modified: 2026-06-17T04:17:41.110Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: Linux

## Description

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.

(As written by CVE List.)

## Affected

- Linux Linux: from fd734c6f25aea4b2b44b045e489aec67b388577e before cbd86110546f7f730a1f5d7de56c944a336c15c4; from fd734c6f25aea4b2b44b045e489aec67b388577e before 1dd5b819f7e406dc15bbc7670596ff25261aaa2a; from fd734c6f25aea4b2b44b045e489aec67b388577e before c8718026ba287168ff9ad0ccc4f9a413062cba36; from fd734c6f25aea4b2b44b045e489aec67b388577e before ccf070183e4655824936c0f96c4a2bcca93419aa; from fd734c6f25aea4b2b44b045e489aec67b388577e before 1a295fea90e1acbe80c6d4940f5ff856edcd6bec; from fd734c6f25aea4b2b44b045e489aec67b388577e before 923f4dc5df679f678e121c20bf2fd70f7bf3e288; from fd734c6f25aea4b2b44b045e489aec67b388577e before 474f9a8534f5f89841240a7e978bafd6e1e039ce; from fd734c6f25aea4b2b44b045e489aec67b388577e before 3ec6ca6b1a8e64389f0212b5a1b0f6fed1909e45; 3.2 (not affected: before 3.2; from 4.4.295 up to 4.4.*; from 4.9.293 up to 4.9.*; from 4.14.258 up to 4.14.*; from 4.19.221 up to 4.19.*; from 5.4.165 up to 5.4.*; from 5.10.85 up to 5.10.*; from 5.15.8 up to 5.15.*; from 5.16 up to *)
- linux linux_kernel: from 3.2 before 4.4.295; from 4.5 before 4.9.293; from 4.10 before 4.14.258; from 4.15 before 4.19.221; from 4.20 before 5.4.165; from 5.5 before 5.10.85; from 5.11 before 5.15.8

## References

- <https://git.kernel.org/stable/c/cbd86110546f7f730a1f5d7de56c944a336c15c4> (patch)
- <https://git.kernel.org/stable/c/1dd5b819f7e406dc15bbc7670596ff25261aaa2a> (patch)
- <https://git.kernel.org/stable/c/c8718026ba287168ff9ad0ccc4f9a413062cba36> (patch)
- <https://git.kernel.org/stable/c/ccf070183e4655824936c0f96c4a2bcca93419aa> (patch)
- <https://git.kernel.org/stable/c/1a295fea90e1acbe80c6d4940f5ff856edcd6bec> (patch)
- <https://git.kernel.org/stable/c/923f4dc5df679f678e121c20bf2fd70f7bf3e288> (patch)
- <https://git.kernel.org/stable/c/474f9a8534f5f89841240a7e978bafd6e1e039ce> (patch)
- <https://git.kernel.org/stable/c/3ec6ca6b1a8e64389f0212b5a1b0f6fed1909e45> (patch)

## Sources

- CVE List: [CVE-2021-47521](https://www.cve.org/CVERecord?id=CVE-2021-47521), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2021-47521](https://nvd.nist.gov/vuln/detail/CVE-2021-47521), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-47521 · Whole record: https://cve.day/CVE-2021-47521.json · Rebuilt by cve.day 2026-11-25T22:58:08.898Z
