CVE-2021-47235

net: ethernet: fix potential use-after-free in ec_bhf_remove

published May 21, 2024

CVSS
—
EPSS
0%
Percentile
12.9
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.00228 · 12.9th percentile
Published
2024-05-21T14:19Z
EPSS history
Timeline
  • 21 MAY 14:19Z
    net: ethernet: fix potential use-after-free in ec_bhf_remove
    cvelistv5