CVE-2021-47013

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

HIGH
7.8
CVSS Score
Published: February 28, 2024 at 08:13 AM UTC
Updated: August 5, 2026 at 09:24 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.8%
SSVC
No known exploit

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

4.10 ≤ v < 4.14.2334.15 ≤ v < 4.19.1914.20 ≤ v < 5.4.1194.9 ≤ v < 4.14.2334.9 ≤ v < 4.19.1914.9 ≤ v < 4.9.2694.9 ≤ v < 5.10.374.9 ≤ v < 5.11.214.9 ≤ v < 5.12.44.9 ≤ v < 5.134.9 ≤ v < 5.4.1195.11 ≤ v < 5.11.215.12 ≤ v < 5.12.45.5 ≤ v < 5.10.374.9b9b17debc69d27cd55e21ee51a5ba7fc50a426cf
Vendor states this is fixed in 16d8c44be52e3650917736d45f5904384a9da834 (fixed)
Vendor states this is fixed in 55fcdd1258faaecca74b91b88cc0921f9edd775d (fixed)
Vendor states this is fixed in 6d72e7c767acbbdd44ebc7d89c6690b405b32b57 (fixed)
Vendor states this is fixed in 8c06f34785068b87e2b560534c77c163d6c6dca7 (fixed)
Vendor states this is fixed in 9dc373f74097edd0e35f3393d6248eda8d1ba99d (fixed)
Vendor states this is fixed in c7f75d11fe72913d2619f97b2334b083cd7bb955 (fixed)
Vendor states this is fixed in dc1b438a35773d030be0ee80d9c635c3e558a322 (fixed)
Vendor states this is fixed in e407495ba6788a67d1bd41714158c079e340879b (fixed)
Vendor states this is fixed in 4.14.233 (unaffected)
Vendor states this is fixed in 4.19.191 (unaffected)
Vendor states this is fixed in 4.9 (unaffected)
Vendor states this is fixed in 4.9.269 (unaffected)
Vendor states this is fixed in 5.10.37 (unaffected)
Vendor states this is fixed in 5.11.21 (unaffected)
Vendor states this is fixed in 5.12.4 (unaffected)
Vendor states this is fixed in 5.13 (unaffected)
Vendor states this is fixed in 5.4.119 (unaffected)

References (8)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/16d8c44be52e3650917736d45f5904384a9da834
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/55fcdd1258faaecca74b91b88cc0921f9edd775d
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/6d72e7c767acbbdd44ebc7d89c6690b405b32b57
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/8c06f34785068b87e2b560534c77c163d6c6dca7
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9dc373f74097edd0e35f3393d6248eda8d1ba99d
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/c7f75d11fe72913d2619f97b2334b083cd7bb955
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/dc1b438a35773d030be0ee80d9c635c3e558a322
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/e407495ba6788a67d1bd41714158c079e340879b

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-416

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card