CVE-2021-47235: net: ethernet: fix potential use-after-free in ec_bhf_remove
In the Linux kernel, the following vulnerability has been resolved:
net: ethernet: fix potential use-after-free in ec_bhf_remove
static void ec_bhf_remove(struct pci_dev *dev)
{
...
struct ec_bhf_priv *priv = netdev_priv(net_dev);
unregister_netdev(net_dev);
free_netdev(net_dev);
pci_iounmap(dev, priv->dma_io);
pci_iounmap(dev, priv->io);
...
}
priv is netdev private data, but it is used
after free_netdev(). It can cause use-after-free when accessing priv
pointer. So, fix it by moving free_netdev() after pci_iounmap()
calls.
Security readout for executives and security teams
Plain-English summary
CVE-2021-47235 is a Linux kernel memory-safety bug in an Ethernet driver removal path. The code could use driver-private memory after it was freed. The public bundle does not provide a CVSS score, business impact rating, or evidence of active exploitation.
Executive priority
Treat this as a kernel maintenance item unless local inventory shows use of the affected driver path on important systems. No active exploitation or severity score is provided, so urgency should be driven by exposure and normal patch cadence.
Technical view
The issue is a potential use-after-free in ec_bhf_remove(). The function frees the netdev, then accesses priv, which is netdev private data, while unmapping PCI I/O regions. The kernel fix reorders cleanup so pci_iounmap() calls happen before free_netdev().
Likely exposure
Exposure appears limited to Linux systems running affected kernel versions and the relevant Ethernet driver path. The bundle lists Linux kernel versions including 3.15 through 5.13-era stable releases, but does not identify distributions, default configurations, or reachable attack paths.
Exploitation context
The source bundle marks KEV as false and provides no cited evidence of public exploitation. The bug is in cleanup/removal logic, so practical risk likely depends on driver presence, hardware, privileges, and whether the removal path can be triggered.
Researcher notes
Evidence supports a use-after-free caused by cleanup ordering in ec_bhf_remove(). The bundle does not provide CVSS, CWE, exploitability analysis, distribution mappings, or runtime prerequisites. Further assessment should focus on driver reachability and backport status in deployed kernels.
Mitigation direction
Apply vendor-supported Linux kernel updates containing the referenced stable fixes.
Prioritize systems using the relevant Ethernet driver or matching hardware path.
Check distribution advisories for CVE-2021-47235 before choosing a package version.
Avoid relying on upstream commit hashes alone for distribution kernels.
Schedule reboots or live-patching according to normal kernel maintenance policy.
Validation and detection
Inventory Linux kernel versions against the affected version list in the CVE bundle.
Confirm whether the relevant Ethernet driver is built, loaded, or used.
Verify kernel changelogs mention CVE-2021-47235 or the referenced stable commits.
Review asset records for systems with matching PCI Ethernet hardware.
After patching, confirm the running kernel is the updated build.
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-47235 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.