CVE-2022-50868

hwrng: amd - Fix PCI device refcount leak

State
Published
Severity
Not scored
Published
Dec 30, 2025
Updated
May 11, 2026
Reserved
Dec 30, 2025

Read the record on cve.org

Description

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

hwrng: amd - Fix PCI device refcount leak

for_each_pci_dev() is implemented by pci_get_device(). The comment of pci_get_device() says that it will increase the reference count for the returned pci_dev and also decrease the reference count for the input pci_dev @from if it is not NULL.

If we break for_each_pci_dev() loop with pdev not NULL, we need to call pci_dev_put() to decrease the reference count. Add the missing pci_dev_put() for the normal and error path.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 96d63c0297ccfd6d9059c614b3f5555d9441a2b3 to before f1c97f72ffd504f49882774e2ab689d982dc7afcAffected
  • 96d63c0297ccfd6d9059c614b3f5555d9441a2b3 to before 526c316948819d3ecd2bb20fe5e2580c51a1b760Affected
  • 96d63c0297ccfd6d9059c614b3f5555d9441a2b3 to before e246f5eff26055bdcb61a2cc99c50af72a19680fAffected
  • 96d63c0297ccfd6d9059c614b3f5555d9441a2b3 to before 1199f8e02941b326c60ab71a63002b7c80e38212Affected
  • 96d63c0297ccfd6d9059c614b3f5555d9441a2b3 to before 5998e5c30e839f73e62cb29e0d9617b0d16ccba3Affected
  • 96d63c0297ccfd6d9059c614b3f5555d9441a2b3 to before 2b79a5e560779b35e1164d57ae35c48b43373082Affected
  • 96d63c0297ccfd6d9059c614b3f5555d9441a2b3 to before cb348c7908631dd9f60083a0a1542eab055d3edfAffected
  • 96d63c0297ccfd6d9059c614b3f5555d9441a2b3 to before 2e10ecd012ae2b2a374b34f307e9bc1e6096c03dAffected
  • 96d63c0297ccfd6d9059c614b3f5555d9441a2b3 to before ecadb5b0111ea19fc7c240bb25d424a94471eb7dAffected
LinuxLinux
  • 2.6.18Affected
  • before 2.6.18Not affected
  • 4.9.337 through 4.9.*Not affected
  • 4.14.303 through 4.14.*Not affected
  • 4.19.270 through 4.19.*Not affected
  • 5.4.229 through 5.4.*Not affected
  • 5.10.163 through 5.10.*Not affected
  • 5.15.86 through 5.15.*Not affected
  • 6.0.16 through 6.0.*Not affected
  • 6.1.2 through 6.1.*Not affected
  • 6.2 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.