Vulnerability · Published Feb 28, 2024 · Assigned by Linux
CVE-2021-47013net:emac/emac-mac: Fix a use after free in emac_mac_tx_buf_send
Critical 9.8
In plain English
A critical-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.8% (higher than 56% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | bpftool | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | kernel | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | kernel-abi-stablelists | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | kernel-core | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | kernel-cross-headers | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | kernel-debug | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | kernel-debug-core | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | kernel-debug-devel | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | kernel-debug-modules | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | kernel-debug-modules-extra | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | kernel-devel | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | kernel-doc | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | kernel-headers | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | kernel-modules | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | kernel-modules-extra | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | kernel-rt | 4.18.0-553.5.1.rt7.346.el8_10 | ALSA-2024:3627 |
| AlmaLinux:8 | kernel-rt-core | 4.18.0-553.5.1.rt7.346.el8_10 | ALSA-2024:3627 |
| AlmaLinux:8 | kernel-rt-debug | 4.18.0-553.5.1.rt7.346.el8_10 | ALSA-2024:3627 |
| AlmaLinux:8 | kernel-rt-debug-core | 4.18.0-553.5.1.rt7.346.el8_10 | ALSA-2024:3627 |
| AlmaLinux:8 | kernel-rt-debug-devel | 4.18.0-553.5.1.rt7.346.el8_10 | ALSA-2024:3627 |
| AlmaLinux:8 | kernel-rt-debug-kvm | 4.18.0-553.5.1.rt7.346.el8_10 | ALSA-2024:3627 |
| AlmaLinux:8 | kernel-rt-debug-modules | 4.18.0-553.5.1.rt7.346.el8_10 | ALSA-2024:3627 |
| AlmaLinux:8 | kernel-rt-debug-modules-extra | 4.18.0-553.5.1.rt7.346.el8_10 | ALSA-2024:3627 |
| AlmaLinux:8 | kernel-rt-devel | 4.18.0-553.5.1.rt7.346.el8_10 | ALSA-2024:3627 |
| AlmaLinux:8 | kernel-rt-kvm | 4.18.0-553.5.1.rt7.346.el8_10 | ALSA-2024:3627 |
| AlmaLinux:8 | kernel-rt-modules | 4.18.0-553.5.1.rt7.346.el8_10 | ALSA-2024:3627 |
| AlmaLinux:8 | kernel-rt-modules-extra | 4.18.0-553.5.1.rt7.346.el8_10 | ALSA-2024:3627 |
| AlmaLinux:8 | kernel-tools | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | kernel-tools-libs | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | kernel-tools-libs-devel | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | kernel-zfcpdump | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | kernel-zfcpdump-core | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | kernel-zfcpdump-devel | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | kernel-zfcpdump-modules | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | kernel-zfcpdump-modules-extra | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | perf | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| AlmaLinux:8 | python3-perf | 4.18.0-553.5.1.el8_10 | ALSA-2024:3618 |
| Debian:12 | linux | 5.10.38-1 | DEBIAN-CVE-2021-47013 |
| Debian:13 | linux | 5.10.38-1 | DEBIAN-CVE-2021-47013 |
| Debian:14 | linux | 5.10.38-1 | DEBIAN-CVE-2021-47013 |
| Rocky Linux:8 | kernel | 0:4.18.0-553.5.1.el8_10 | RLSA-2024:3618 |
| Rocky Linux:8 | kernel-rt | 0:4.18.0-553.5.1.rt7.346.el8_10 | RLSA-2024:3627 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2021-47013 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2021-47013 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2021-47013 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2021-47013 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2021-47013 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2021-47013 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2021-47013 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2021-47013 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2021-47013 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2021-47013 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2021-47013 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2021-47013 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2021-47013 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2021-47013 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2021-47013 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2021-47013 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2021-47013 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2021-47013 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2021-47013 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2021-47013 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2021-47013 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2021-47013 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2021-47013 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2021-47013 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | b9b17debc69d27cd55e21ee51a5ba7fc50a426cf – before c7f75d11fe72913d2619f97b2334b083cd7bb955b9b17debc69d27cd55e21ee51a5ba7fc50a426cf – before dc1b438a35773d030be0ee80d9c635c3e558a322b9b17debc69d27cd55e21ee51a5ba7fc50a426cf – before 16d8c44be52e3650917736d45f5904384a9da834b9b17debc69d27cd55e21ee51a5ba7fc50a426cf – before 55fcdd1258faaecca74b91b88cc0921f9edd775db9b17debc69d27cd55e21ee51a5ba7fc50a426cf – before 9dc373f74097edd0e35f3393d6248eda8d1ba99db9b17debc69d27cd55e21ee51a5ba7fc50a426cf – before 8c06f34785068b87e2b560534c77c163d6c6dca7b9b17debc69d27cd55e21ee51a5ba7fc50a426cf – before e407495ba6788a67d1bd41714158c079e340879bb9b17debc69d27cd55e21ee51a5ba7fc50a426cf – before 6d72e7c767acbbdd44ebc7d89c6690b405b32b57 |
| Linux | Linux | 4.9 |
References
- https://git.kernel.org/stable/c/c7f75d11fe72913d2619f97b2334b083cd7bb955
- https://git.kernel.org/stable/c/dc1b438a35773d030be0ee80d9c635c3e558a322
- https://git.kernel.org/stable/c/16d8c44be52e3650917736d45f5904384a9da834
- https://git.kernel.org/stable/c/55fcdd1258faaecca74b91b88cc0921f9edd775d
- https://git.kernel.org/stable/c/9dc373f74097edd0e35f3393d6248eda8d1ba99d
- https://git.kernel.org/stable/c/8c06f34785068b87e2b560534c77c163d6c6dca7
- https://git.kernel.org/stable/c/e407495ba6788a67d1bd41714158c079e340879b
- https://git.kernel.org/stable/c/6d72e7c767acbbdd44ebc7d89c6690b405b32b57