CVE-2021-47416

Source
https://nvd.nist.gov/vuln/detail/CVE-2021-47416
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-47416.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-47416
Related
Published
2024-05-21T15:15:27Z
Modified
2024-09-18T03:17:27.469510Z
Summary
[none]
Details

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.

MDIOBUSALLOCATED indicates 2 states: 1. Bus is only allocated 2. Bus allocated and _mdiobusregister() fails, but deviceregister() was called

In case of deviceregister() has been called we should call putdevice() to correctly free the memory allocated for this device, but mdiobusfree() calls just kfree(dev) in case of MDIOBUSALLOCATED state

To avoid this behaviour we need to set bus->state to MDIOBUSUNREGISTERED _before calling deviceregister(), because putdevice() should be called even in case of device_register() failure.

References

Affected packages

Debian:11 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.10.84-1

Affected versions

5.*

5.10.46-4
5.10.46-5
5.10.70-1~bpo10+1
5.10.70-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:12 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.14.12-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:13 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.14.12-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}