Skip to content
Heist/ feed
Back to feed
UnratedFix available

net: dsa: bcm_sf2: Fix a possible memory leak in bcm_sf2_mdio_register()

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: net: dsa: bcm_sf2: Fix a possible memory leak in bcm_sf2_mdio_register() bcm_sf2_mdio_register() calls of_phy_find_device() and then phy_device_remove() in a loop to remove existing PHY devices. of_phy_find_device() eventually calls bus_find_device(), which calls get_device() on the returned struct device * to increment the refcount. The current implementation does not decrement the refcount, which causes memory leak. This commit adds the missing phy_device_free() call to decrement the refcount via put_device() to balance the refcount.

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.224, 5.15.165, 6.1.105, 6.10.5, 6.6.46
CVEs
CVE-2024-44971
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 13:28 UTC · Revision 1

Source evidence

net: dsa: bcm_sf2: Fix a possible memory leak in bcm_sf2_mdio_register()

core-osv · Original source

Published 4 Sept 2024, 18:56 UTC

In the Linux kernel, the following vulnerability has been resolved: net: dsa: bcm_sf2: Fix a possible memory leak in bcm_sf2_mdio_register() bcm_sf2_mdio_register() calls of_phy_find_device() and then phy_device_remove() in a loop to remove existing PHY devices. of_phy_find_device() eventually calls bus_find_device(), which calls get_device() on the returned struct device * to increment the refcount. The current implementation does not decrement the refcount, which causes memory leak. This commit adds the missing phy_device_free() call to decrement the refcount via put_device() to balance the refcount.

osv:CVE-2024-44971

Kernel

Fixed versions: 5.10.224, 5.15.165, 6.1.105, 6.6.46, 6.10.5

Complete source record
{
  "id": "9adb2bb8d9a8c5cb2d1e413fefc523ddccb4598345225a24c625ddb353fabc2e",
  "url": "https://osv.dev/vulnerability/CVE-2024-44971",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "net: dsa: bcm_sf2: Fix a possible memory leak in bcm_sf2_mdio_register()",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: net: dsa: bcm_sf2: Fix a possible memory leak in bcm_sf2_mdio_register() bcm_sf2_mdio_register() calls of_phy_find_device() and then phy_device_remove() in a loop to remove existing PHY devices. of_phy_find_device() eventually calls bus_find_device(), which calls get_device() on the returned struct device * to increment the refcount. The current implementation does not decrement the refcount, which causes memory leak. This commit adds the missing phy_device_free() call to decrement the refcount via put_device() to balance the refcount.",
    "evidence": "osv:CVE-2024-44971",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.10.224",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.165",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.105",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.46",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.10.5",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2024-44971",
      "aliases": [
        "CVE-2024-44971"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "771089c2a485958e423f305e974303760167b45c"
                },
                {
                  "fixed": "b7b8d9f5e679af60c94251fd6728dde34be69a71"
                },
                {
                  "fixed": "c05516c072903f6fb9134b8e7e1ad4bffcdc4819"
                },
                {
                  "fixed": "7feef10768ea71d468d9bbc1e0d14c461876768c"
                },
                {
                  "fixed": "a7d2808d67570e6acae45c2a96e0d59986888e4c"
                },
                {
                  "fixed": "f3d5efe18a11f94150fee8b3fda9d62079af640a"
                },
                {
                  "fixed": "e3862093ee93fcfbdadcb7957f5f8974fffa806a"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-44971.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.10.0"
                },
                {
                  "fixed": "5.10.224"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.165"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.105"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.46"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.10.5"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-44971.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:36.055503636Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/7feef10768ea71d468d9bbc1e0d14c461876768c",
        "https://git.kernel.org/stable/c/a7d2808d67570e6acae45c2a96e0d59986888e4c",
        "https://git.kernel.org/stable/c/b7b8d9f5e679af60c94251fd6728dde34be69a71",
        "https://git.kernel.org/stable/c/c05516c072903f6fb9134b8e7e1ad4bffcdc4819",
        "https://git.kernel.org/stable/c/e3862093ee93fcfbdadcb7957f5f8974fffa806a",
        "https://git.kernel.org/stable/c/f3d5efe18a11f94150fee8b3fda9d62079af640a",
        "https://lists.debian.org/debian-lts-announce/2024/10/msg00003.html",
        "https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/44xxx/CVE-2024-44971.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-44971",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/44xxx/CVE-2024-44971.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-44971",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 503121,
  "published_at": "2024-09-04T18:56:47.475+00:00"
}