CVE-2021-47013: net:emac/emac-mac: Fix a use after free in emac_mac_tx_buf_send
In the Linux kernel, the following vulnerability has been resolved:
net:emac/emac-mac: Fix a use after free in emacmactxbufsend
In emacmactxbufsend, it calls emactxfilltpd(..,skb,..). If some error happens in emactxfilltpd(), the skb will be freed via devkfreeskb(skb) in error branch of emactxfilltpd(). But the freed skb is still used via skb->len by netdevsentqueue(,skb->len).
As i observed that emactxfilltpd() haven't modified the value of skb->len, thus my patch assigns skb->len to 'len' before the possible free and use 'len' instead of skb->len later.
Other sources
In the Linux kernel, the following vulnerability has been resolved:
net:emac/emac-mac: Fix a use after free in emacmactxbufsend
The Linux kernel CVE team has assigned CVE-2021-47013 to this issue.
Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024022831-CVE-2021-47013-034a@gregkh/T/#u
— Red Hat
Linux Kernel could allow a local authenticated attacker to obtain sensitive information, caused by a use-after-free flaw in the emacmactxbufsend function. By sending a specially crafted request, an attacker could exploit this vulnerability to obtain sensitive information or cause a denial of service condition.
— IBM
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2021-47013?
CVE-2021-47013 is classified as a medium severity vulnerability affecting the Linux kernel.
How do I fix CVE-2021-47013?
To resolve CVE-2021-47013, upgrade to kernel version 4.9.269, 4.14.233, 4.19.191, 5.4.119, 5.10.37, 5.11.21, 5.12.4 or 5.13.
Which systems are affected by CVE-2021-47013?
CVE-2021-47013 affects various versions of the Linux kernel prior to specified fixed versions.
Is CVE-2021-47013 a remote code execution vulnerability?
CVE-2021-47013 is related to a use-after-free vulnerability that could potentially lead to system instability.
What components does CVE-2021-47013 involve?
CVE-2021-47013 involves components of the Linux kernel's network protocol stack, specifically the emac driver.