# CVE-2021-47013: net:emac/emac-mac: Fix a use after free in emac_mac_tx_buf_send

- Severity: Critical 9.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:L/PR:N/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.79%, higher than 53% of CVEs (2026-11-30)
- Published: 2024-02-28T08:13:30.905Z
- Modified: 2026-08-05T08:45:34.504Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

net:emac/emac-mac: Fix a use after free in emac_mac_tx_buf_send

In emac_mac_tx_buf_send, it calls emac_tx_fill_tpd(..,skb,..).
If some error happens in emac_tx_fill_tpd(), the skb will be freed via
dev_kfree_skb(skb) in error branch of emac_tx_fill_tpd().
But the freed skb is still used via skb->len by netdev_sent_queue(,skb->len).

As i observed that emac_tx_fill_tpd() 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.

(As written by CVE List.)

## Affected

- Linux Linux: from b9b17debc69d27cd55e21ee51a5ba7fc50a426cf before c7f75d11fe72913d2619f97b2334b083cd7bb955; from b9b17debc69d27cd55e21ee51a5ba7fc50a426cf before dc1b438a35773d030be0ee80d9c635c3e558a322; from b9b17debc69d27cd55e21ee51a5ba7fc50a426cf before 16d8c44be52e3650917736d45f5904384a9da834; from b9b17debc69d27cd55e21ee51a5ba7fc50a426cf before 55fcdd1258faaecca74b91b88cc0921f9edd775d; from b9b17debc69d27cd55e21ee51a5ba7fc50a426cf before 9dc373f74097edd0e35f3393d6248eda8d1ba99d; from b9b17debc69d27cd55e21ee51a5ba7fc50a426cf before 8c06f34785068b87e2b560534c77c163d6c6dca7; from b9b17debc69d27cd55e21ee51a5ba7fc50a426cf before e407495ba6788a67d1bd41714158c079e340879b; from b9b17debc69d27cd55e21ee51a5ba7fc50a426cf before 6d72e7c767acbbdd44ebc7d89c6690b405b32b57; 4.9 (not affected: before 4.9; from 4.9.269 up to 4.9.*; from 4.14.233 up to 4.14.*; from 4.19.191 up to 4.19.*; from 5.4.119 up to 5.4.*; from 5.10.37 up to 5.10.*; from 5.11.21 up to 5.11.*; from 5.12.4 up to 5.12.*; from 5.13 up to *)
- linux linux_kernel: from 4.9 before 4.9.269; from 4.10 before 4.14.233; from 4.15 before 4.19.191; from 4.20 before 5.4.119; from 5.5 before 5.10.37; from 5.11 before 5.11.21; from 5.12 before 5.12.4

## Every score

- Linux: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/c7f75d11fe72913d2619f97b2334b083cd7bb955> (patch)
- <https://git.kernel.org/stable/c/dc1b438a35773d030be0ee80d9c635c3e558a322> (patch)
- <https://git.kernel.org/stable/c/16d8c44be52e3650917736d45f5904384a9da834> (patch)
- <https://git.kernel.org/stable/c/55fcdd1258faaecca74b91b88cc0921f9edd775d> (patch)
- <https://git.kernel.org/stable/c/9dc373f74097edd0e35f3393d6248eda8d1ba99d> (patch)
- <https://git.kernel.org/stable/c/8c06f34785068b87e2b560534c77c163d6c6dca7> (patch)
- <https://git.kernel.org/stable/c/e407495ba6788a67d1bd41714158c079e340879b> (patch)
- <https://git.kernel.org/stable/c/6d72e7c767acbbdd44ebc7d89c6690b405b32b57> (patch)

## Sources

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

---

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