cve-2024-56745
Vulnerability from cvelistv5
Published
2024-12-29 11:30
Modified
2025-01-20 06:27
Severity ?
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.
Impacted products
Vendor Product Version
Linux Linux Version: d88f521da3efd698e36d0d504a2abba6ac4f5ef8
Version: d88f521da3efd698e36d0d504a2abba6ac4f5ef8
Version: d88f521da3efd698e36d0d504a2abba6ac4f5ef8
Version: d88f521da3efd698e36d0d504a2abba6ac4f5ef8
Version: d88f521da3efd698e36d0d504a2abba6ac4f5ef8
Version: d88f521da3efd698e36d0d504a2abba6ac4f5ef8
Create a notification for this product.
   Linux Linux Version: 5.15
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/pci/pci.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "403efb4457c0c8f8f51e904cc57d39193780c6bd",
              "status": "affected",
              "version": "d88f521da3efd698e36d0d504a2abba6ac4f5ef8",
              "versionType": "git"
            },
            {
              "lessThan": "931d07ccffcc3614f20aaf602b31e89754e21c59",
              "status": "affected",
              "version": "d88f521da3efd698e36d0d504a2abba6ac4f5ef8",
              "versionType": "git"
            },
            {
              "lessThan": "8e098baf6bc3f3a6aefc383509aba07e202f7ee0",
              "status": "affected",
              "version": "d88f521da3efd698e36d0d504a2abba6ac4f5ef8",
              "versionType": "git"
            },
            {
              "lessThan": "543d0eb40e45c6a51f1bff02f417b602e54472d5",
              "status": "affected",
              "version": "d88f521da3efd698e36d0d504a2abba6ac4f5ef8",
              "versionType": "git"
            },
            {
              "lessThan": "fe6fae61f3b993160aef5fe2b7141a83872c144f",
              "status": "affected",
              "version": "d88f521da3efd698e36d0d504a2abba6ac4f5ef8",
              "versionType": "git"
            },
            {
              "lessThan": "2985b1844f3f3447f2d938eff1ef6762592065a5",
              "status": "affected",
              "version": "d88f521da3efd698e36d0d504a2abba6ac4f5ef8",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/pci/pci.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.15"
            },
            {
              "lessThan": "5.15",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.174",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.120",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.64",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.11.*",
              "status": "unaffected",
              "version": "6.11.11",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.13",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nPCI: Fix reset_method_store() memory leak\n\nIn reset_method_store(), a string is allocated via kstrndup() and assigned\nto the local \"options\". options is then used in with strsep() to find\nspaces:\n\n  while ((name = strsep(\u0026options, \" \")) != NULL) {\n\nIf there are no remaining spaces, then options is set to NULL by strsep(),\nso the subsequent kfree(options) doesn\u0027t free the memory allocated via\nkstrndup().\n\nFix by using a separate tmp_options to iterate with strsep() so options is\npreserved."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-01-20T06:27:16.240Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/403efb4457c0c8f8f51e904cc57d39193780c6bd"
        },
        {
          "url": "https://git.kernel.org/stable/c/931d07ccffcc3614f20aaf602b31e89754e21c59"
        },
        {
          "url": "https://git.kernel.org/stable/c/8e098baf6bc3f3a6aefc383509aba07e202f7ee0"
        },
        {
          "url": "https://git.kernel.org/stable/c/543d0eb40e45c6a51f1bff02f417b602e54472d5"
        },
        {
          "url": "https://git.kernel.org/stable/c/fe6fae61f3b993160aef5fe2b7141a83872c144f"
        },
        {
          "url": "https://git.kernel.org/stable/c/2985b1844f3f3447f2d938eff1ef6762592065a5"
        }
      ],
      "title": "PCI: Fix reset_method_store() memory leak",
      "x_generator": {
        "engine": "bippy-5f407fcff5a0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-56745",
    "datePublished": "2024-12-29T11:30:12.434Z",
    "dateReserved": "2024-12-29T11:26:39.758Z",
    "dateUpdated": "2025-01-20T06:27:16.240Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-56745\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-12-29T12:15:07.937\",\"lastModified\":\"2025-01-07T22:47:40.577\",\"vulnStatus\":\"Analyzed\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nPCI: Fix reset_method_store() memory leak\\n\\nIn reset_method_store(), a string is allocated via kstrndup() and assigned\\nto the local \\\"options\\\". options is then used in with strsep() to find\\nspaces:\\n\\n  while ((name = strsep(\u0026options, \\\" \\\")) != NULL) {\\n\\nIf there are no remaining spaces, then options is set to NULL by strsep(),\\nso the subsequent kfree(options) doesn\u0027t free the memory allocated via\\nkstrndup().\\n\\nFix by using a separate tmp_options to iterate with strsep() so options is\\npreserved.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: PCI: Corregir p\u00e9rdida de memoria de reset_method_store() En reset_method_store(), se asigna una cadena a trav\u00e9s de kstrndup() y se asigna a las \\\"opciones\\\" locales. Luego, se usa options con strsep() para buscar espacios: while ((name = strsep(\u0026amp;options, \\\" \\\")) != NULL) { Si no quedan espacios, strsep() establece options en NULL, por lo que el kfree(options) posterior no libera la memoria asignada a trav\u00e9s de kstrndup(). Se soluciona utilizando un tmp_options separado para iterar con strsep() de modo que se preserve options.\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H\",\"baseScore\":5.5,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":3.6}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-401\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.15\",\"versionEndExcluding\":\"5.15.174\",\"matchCriteriaId\":\"005C9407-09BA-46F6-A8A9-A04EED9F948E\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.16\",\"versionEndExcluding\":\"6.1.120\",\"matchCriteriaId\":\"09AC6122-E2A4-40FE-9D33-268A1B2EC265\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.2\",\"versionEndExcluding\":\"6.6.64\",\"matchCriteriaId\":\"CA16DEE3-ABEC-4449-9F4A-7A3DC4FC36C7\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.7\",\"versionEndExcluding\":\"6.11.11\",\"matchCriteriaId\":\"21434379-192D-472F-9B54-D45E3650E893\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.12\",\"versionEndExcluding\":\"6.12.2\",\"matchCriteriaId\":\"D8882B1B-2ABC-4838-AC1D-DBDBB5764776\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/2985b1844f3f3447f2d938eff1ef6762592065a5\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/403efb4457c0c8f8f51e904cc57d39193780c6bd\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/543d0eb40e45c6a51f1bff02f417b602e54472d5\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/8e098baf6bc3f3a6aefc383509aba07e202f7ee0\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/931d07ccffcc3614f20aaf602b31e89754e21c59\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/fe6fae61f3b993160aef5fe2b7141a83872c144f\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.