CVE-2021-47416 json
phy: mdio: fix memory leak
published 2024-05-21 2 y ago modified 2026-06-17 4 mo ago also EUVD-2021-34421
- cvss
- 5.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 14%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- Linux Linux 4.4.289, 4.9.287, 4.14.251, 4.19.211, 5.4.153, 5.10.73, 5.14.12, 5.15
- linux Debian 14, Debian 13, Debian 12 5.14.12-1
debian advisories DEBIAN-CVE-2021-47416
- linux Ubuntu 18.04 LTS 4.15.0-166.174
- linux Ubuntu 20.04 LTS 5.4.0-92.103
- linux-aws Ubuntu 18.04 LTS 4.15.0-1118.125
- linux-aws Ubuntu 20.04 LTS 5.4.0-1061.64
- linux-gcp Ubuntu 20.04 LTS 5.4.0-1059.63
- linux-ibm Ubuntu 20.04 LTS 5.4.0-1010.11
- linux-kvm Ubuntu 18.04 LTS 4.15.0-1105.107
- linux-kvm Ubuntu 20.04 LTS 5.4.0-1051.53
ubuntu advisories UBUNTU-CVE-2021-47416
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel-64kb SLE Module for Basesystem 15 SP5 5.14.21-150500.55.88.1
- kernel-syms SLE Module for Development Tools 15 SP5 5.14.21-150500.55.88.1
- kernel-source SLE Module for Development Tools 15 SP5, SLE Module for Basesystem 15 SP5 5.14.21-150500.55.88.1
- kernel-default SLE Module for Legacy 15 SP5, SLE Module for Basesystem 15 SP5, SLE Micro 5.5 +2 more 5.14.21-150500.55.88.1
- kernel-zfcpdump SLE Module for Basesystem 15 SP5 5.14.21-150500.55.88.1
- kernel-obs-build SLE Module for Development Tools 15 SP5 5.14.21-150500.55.88.1
- kernel-default-base SLE Module for Basesystem 15 SP5, SLE Micro 5.5 5.14.21-150500.55.88.1.150500.6.39.4
- kernel-64kb SLES 15 SP3-LTSS, SLE High Performance Computing 15 SP3-LTSS, Enterprise Storage 7.1 5.3.18-150300.59.182.1
suse advisories SUSE-SU-2025:0034-1SUSE-SU-2024:4364-1SUSE-SU-2024:4140-1SUSE-SU-2024:4131-1SUSE-SU-2024:4103-1SUSE-SU-2024:4100-1
- git.kernel.org/stable/c/25e9f88c7e3cc35f5e3d3db199660d28a15df639 commit
- git.kernel.org/stable/c/2250392d930bd0d989f24d355d6355b0150256e7 commit
- git.kernel.org/stable/c/f4f502a04ee1e543825af78f47eb7785015cd9f6 commit
- git.kernel.org/stable/c/2397b9e118721292429fea8807a698e71b94795f commit
- git.kernel.org/stable/c/414bb4ead1362ef2c8592db723c017258f213988 commit
- git.kernel.org/stable/c/0d2dd40a7be61b89a7c99dae8ee96389d27b413a commit
- git.kernel.org/stable/c/064c2616234a7394867c924b5c1303974f3a4f4d commit
- git.kernel.org/stable/c/ca6e11c337daf7925ff8a2aac8e84490a8691905 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-47416 updated cvss 5.5
kernel: phy: mdio: fix memory leak
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 moreaffected: no fix planned “Out of support scope”
-
Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 moreaffected: no fix available “Fix deferred”
-
Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.23% chance of exploitation in the next 30 days, higher than 14% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Affected products
- Linux Linux
Classification
- Weakness
-
- CWE-401 Missing Release of Memory after Effective Lifetime
- Technology feeds
References
-
git.kernel.org
/stable/c/25e9f88c7e3cc35f5e3d3db199660d28a15df639
patch
-
git.kernel.org
/stable/c/2250392d930bd0d989f24d355d6355b0150256e7
patch
-
git.kernel.org
/stable/c/f4f502a04ee1e543825af78f47eb7785015cd9f6
patch
-
git.kernel.org
/stable/c/2397b9e118721292429fea8807a698e71b94795f
patch
-
git.kernel.org
/stable/c/414bb4ead1362ef2c8592db723c017258f213988
patch
-
git.kernel.org
/stable/c/0d2dd40a7be61b89a7c99dae8ee96389d27b413a
patch
-
git.kernel.org
/stable/c/064c2616234a7394867c924b5c1303974f3a4f4d
patch
-
git.kernel.org
/stable/c/ca6e11c337daf7925ff8a2aac8e84490a8691905
patch
Sources
- CVE List CVE-2021-47416
- NVD CVE-2021-47416
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.