CVE-2021-47416

phy: mdio: fix memory leak

MEDIUM
5.5
CVSS Score
Published: May 21, 2024 at 03:04 PM UTC
Updated: June 17, 2026 at 04:17 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

2.6.28 ≤ v < 4.14.2512.6.28 ≤ v < 4.19.2112.6.28 ≤ v < 4.4.2892.6.28 ≤ v < 4.9.2872.6.28 ≤ v < 5.10.732.6.28 ≤ v < 5.14.122.6.28 ≤ v < 5.152.6.28 ≤ v < 5.4.1534.10 ≤ v < 4.14.2514.15 ≤ v < 4.19.2114.20 ≤ v < 5.4.1534.5 ≤ v < 4.9.2875.11 ≤ v < 5.14.125.5 ≤ v < 5.10.7346abc02175b3c246dd5141d878f565a8725060c95.15 rc15.15 rc25.15 rc35.15 rc4
Vendor states this is fixed in 064c2616234a7394867c924b5c1303974f3a4f4d (fixed)
Vendor states this is fixed in 0d2dd40a7be61b89a7c99dae8ee96389d27b413a (fixed)
Vendor states this is fixed in 2250392d930bd0d989f24d355d6355b0150256e7 (fixed)
Vendor states this is fixed in 2397b9e118721292429fea8807a698e71b94795f (fixed)
Vendor states this is fixed in 25e9f88c7e3cc35f5e3d3db199660d28a15df639 (fixed)
Vendor states this is fixed in 414bb4ead1362ef2c8592db723c017258f213988 (fixed)
Vendor states this is fixed in ca6e11c337daf7925ff8a2aac8e84490a8691905 (fixed)
Vendor states this is fixed in f4f502a04ee1e543825af78f47eb7785015cd9f6 (fixed)
Vendor states this is fixed in 2.6.28 (unaffected)
Vendor states this is fixed in 4.14.251 (unaffected)
Vendor states this is fixed in 4.19.211 (unaffected)
Vendor states this is fixed in 4.4.289 (unaffected)
Vendor states this is fixed in 4.9.287 (unaffected)
Vendor states this is fixed in 5.10.73 (unaffected)
Vendor states this is fixed in 5.14.12 (unaffected)
Vendor states this is fixed in 5.15 (unaffected)
Vendor states this is fixed in 5.4.153 (unaffected)

References (8)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/064c2616234a7394867c924b5c1303974f3a4f4d
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0d2dd40a7be61b89a7c99dae8ee96389d27b413a
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/2250392d930bd0d989f24d355d6355b0150256e7
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/2397b9e118721292429fea8807a698e71b94795f
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/25e9f88c7e3cc35f5e3d3db199660d28a15df639
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/414bb4ead1362ef2c8592db723c017258f213988
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/ca6e11c337daf7925ff8a2aac8e84490a8691905
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/f4f502a04ee1e543825af78f47eb7785015cd9f6

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-401

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card