Skip to content
Heist/ feed
Back to feed
LowFix available

PCI: Fix reset_method_store() memory leak

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: PCI: Fix reset_method_store() memory leak In reset_method_store(), a string is allocated via kstrndup() and assigned to the local "options". options is then used in with strsep() to find spaces: while ((name = strsep(&options, " ")) != NULL) { If there are no remaining spaces, then options is set to NULL by strsep(), so the subsequent kfree(options) doesn't free the memory allocated via kstrndup(). Fix by using a separate tmp_options to iterate with strsep() so options is preserved.

Products
Kernel
Affected versions
Not specified
Fixed versions
5.15.174, 6.1.120, 6.11.11, 6.12.2, 6.6.64
CVEs
CVE-2024-56745
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 16:36 UTC · Revision 1

Source evidence

PCI: Fix reset_method_store() memory leak

core-osv · Original source

Published 29 Dec 2024, 11:30 UTC

In the Linux kernel, the following vulnerability has been resolved: PCI: Fix reset_method_store() memory leak In reset_method_store(), a string is allocated via kstrndup() and assigned to the local "options". options is then used in with strsep() to find spaces: while ((name = strsep(&options, " ")) != NULL) { If there are no remaining spaces, then options is set to NULL by strsep(), so the subsequent kfree(options) doesn't free the memory allocated via kstrndup(). Fix by using a separate tmp_options to iterate with strsep() so options is preserved.

osv:CVE-2024-56745

Kernel

Fixed versions: 5.15.174, 6.1.120, 6.6.64, 6.11.11, 6.12.2

Complete source record
{
  "id": "f3cd25bca04299a2abbc1906d3b7e2e7d1c04601f20c3878ca757f53d3cf59e1",
  "url": "https://osv.dev/vulnerability/CVE-2024-56745",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "PCI: Fix reset_method_store() memory leak",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: PCI: Fix reset_method_store() memory leak In reset_method_store(), a string is allocated via kstrndup() and assigned to the local \"options\". options is then used in with strsep() to find spaces: while ((name = strsep(&options, \" \")) != NULL) { If there are no remaining spaces, then options is set to NULL by strsep(), so the subsequent kfree(options) doesn't free the memory allocated via kstrndup(). Fix by using a separate tmp_options to iterate with strsep() so options is preserved.",
    "evidence": "osv:CVE-2024-56745",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.15.174",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.120",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.64",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.11.11",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.2",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "low",
    "structured": {
      "id": "CVE-2024-56745",
      "aliases": [
        "CVE-2024-56745"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "d88f521da3efd698e36d0d504a2abba6ac4f5ef8"
                },
                {
                  "fixed": "403efb4457c0c8f8f51e904cc57d39193780c6bd"
                },
                {
                  "fixed": "931d07ccffcc3614f20aaf602b31e89754e21c59"
                },
                {
                  "fixed": "8e098baf6bc3f3a6aefc383509aba07e202f7ee0"
                },
                {
                  "fixed": "543d0eb40e45c6a51f1bff02f417b602e54472d5"
                },
                {
                  "fixed": "fe6fae61f3b993160aef5fe2b7141a83872c144f"
                },
                {
                  "fixed": "2985b1844f3f3447f2d938eff1ef6762592065a5"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-56745.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.15.0"
                },
                {
                  "fixed": "5.15.174"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.120"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.64"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.11.11"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.12.0"
                },
                {
                  "fixed": "6.12.2"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-56745.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:30.527329978Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/2985b1844f3f3447f2d938eff1ef6762592065a5",
        "https://git.kernel.org/stable/c/403efb4457c0c8f8f51e904cc57d39193780c6bd",
        "https://git.kernel.org/stable/c/543d0eb40e45c6a51f1bff02f417b602e54472d5",
        "https://git.kernel.org/stable/c/8e098baf6bc3f3a6aefc383509aba07e202f7ee0",
        "https://git.kernel.org/stable/c/931d07ccffcc3614f20aaf602b31e89754e21c59",
        "https://git.kernel.org/stable/c/fe6fae61f3b993160aef5fe2b7141a83872c144f",
        "https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/56xxx/CVE-2024-56745.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-56745",
        "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/56xxx/CVE-2024-56745.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-56745",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 497456,
  "published_at": "2024-12-29T11:30:12.434+00:00"
}