Lucene search

K
nvd416baaa9-dc9f-4396-8d5f-8c081fb06d67NVD:CVE-2021-47416
HistoryMay 21, 2024 - 3:15 p.m.

CVE-2021-47416

2024-05-2115:15:27
416baaa9-dc9f-4396-8d5f-8c081fb06d67
web.nvd.nist.gov
8
linux kernel
mdio phy
memory leak

AI Score

6.4

Confidence

High

EPSS

0

Percentile

13.0%

In the Linux kernel, the following vulnerability has been resolved:

phy: mdio: fix memory leak

Syzbot reported memory leak in MDIO bus interface, the problem was in
wrong state logic.

MDIOBUS_ALLOCATED indicates 2 states:
1. Bus is only allocated
2. Bus allocated and __mdiobus_register() fails, but
device_register() was called

In case of device_register() has been called we should call put_device()
to correctly free the memory allocated for this device, but mdiobus_free()
calls just kfree(dev) in case of MDIOBUS_ALLOCATED state

To avoid this behaviour we need to set bus->state to MDIOBUS_UNREGISTERED
before calling device_register(), because put_device() should be
called even in case of device_register() failure.

AI Score

6.4

Confidence

High

EPSS

0

Percentile

13.0%