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 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.
Security readout for executives and security teams
Plain-English summary
CVE-2021-47013 is a Linux kernel memory-safety bug in the EMAC network driver transmit path. A packet buffer can be freed during error handling and then referenced afterward. The public record does not provide a severity score, impact statement, or evidence of active exploitation.
Executive priority
Treat this as a targeted kernel maintenance item, not an emergency based on current evidence. Prioritize affected embedded or network-facing Linux systems using the EMAC driver, and fold fixes into the next validated kernel update cycle unless vendor guidance raises severity.
Technical view
The flaw is a use-after-free in emac_mac_tx_buf_send. emac_tx_fill_tpd may free skb on an error path, but the caller later reads skb->len for netdev_sent_queue. Stable kernel commits fix this by saving the length before the possible free and using that saved value afterward.
Likely exposure
Exposure appears limited to systems running affected Linux kernel versions with the EMAC network driver code present and relevant hardware or configuration. The source lists affected Linux versions including 4.9, 4.14.233, 4.19.191, 5.4.119, 5.10.37, 5.11.21, 5.12.4, and 5.13.
Exploitation context
The provided sources do not show active exploitation, public exploit availability, or KEV listing. The likely security concern is kernel memory corruption or crash potential in an affected driver path, but the record does not prove practical exploitability or remote reachability.
Researcher notes
The record lacks CVSS, CWE, exploit status, and detailed impact. Analysis should stay anchored to the driver-specific use-after-free and the stable commit behavior. Avoid broad claims that all Linux systems are practically exposed.
Mitigation direction
Apply distribution kernel updates that include the referenced Linux stable fixes.
Check vendor kernel advisories for affected packages and fixed release versions.
Prioritize systems using EMAC network hardware or related embedded Linux builds.
If patching is delayed, assess whether the EMAC driver is needed in production.
Validation and detection
Inventory Linux kernel versions across servers, appliances, and embedded systems.
Confirm whether EMAC driver support is enabled or loaded on each system.
Map installed kernels against vendor advisories and the referenced stable commits.
Verify patched kernels are booted, not only installed.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2021-47013 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.