CVE-2021-47520: can: pch_can: pch_can_rx_normal: fix use after free
In the Linux kernel, the following vulnerability has been resolved:
can: pchcan: pchcanrxnormal: fix use after free
After calling netifreceiveskb(skb), dereferencing skb is unsafe. Especially, the canframe cf which aliases skb memory is dereferenced just after the call netifreceiveskb(skb).
Reordering the lines solves the issue.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2021-47520?
CVE-2021-47520 is classified as a medium severity vulnerability in the Linux kernel.
How do I fix CVE-2021-47520?
To fix CVE-2021-47520, you should upgrade to a version of the Linux kernel that is not affected, specifically one that is higher than the vulnerable versions listed.
What versions of the Linux kernel are affected by CVE-2021-47520?
CVE-2021-47520 affects multiple versions of the Linux kernel, specifically from 2.6.37 up to but not including 4.4.295, 4.5 up to but not including 4.9.293, and similar ranges for subsequent releases.
What causes the vulnerability CVE-2021-47520?
The vulnerability is caused by a use-after-free condition when dereferencing the can_frame structure right after calling netif_receive_skb.
Is CVE-2021-47520 publicly known?
Yes, CVE-2021-47520 is publicly known and documented in the Common Vulnerabilities and Exposures database.