CVE-2024-56745
JSON

3.3low

PCI: Fix reset_method_store() memory leak

Severity
3.3low CVSS:3.1 by CISA-ADP
Exploit likelihood
0.21% (higher than 12% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

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.

Affected

Product or packageVersionsReported by
Linux Linuxfrom d88f521da3efd698e36d0d504a2abba6ac4f5ef8 before 403efb4457c0c8f8f51e904cc57d39193780c6bd, from d88f521da3efd698e36d0d504a2abba6ac4f5ef8 before 931d07ccffcc3614f20aaf602b31e89754e21c59, from d88f521da3efd698e36d0d504a2abba6ac4f5ef8 before 8e098baf6bc3f3a6aefc383509aba07e202f7ee0, from d88f521da3efd698e36d0d504a2abba6ac4f5ef8 before 543d0eb40e45c6a51f1bff02f417b602e54472d5, from d88f521da3efd698e36d0d504a2abba6ac4f5ef8 before fe6fae61f3b993160aef5fe2b7141a83872c144f, from d88f521da3efd698e36d0d504a2abba6ac4f5ef8 before 2985b1844f3f3447f2d938eff1ef6762592065a5, 5.15
Not affected: before 5.15, from 5.15.174 up to 5.15.*, from 6.1.120 up to 6.1.*, from 6.6.64 up to 6.6.*, from 6.11.11 up to 6.11.*, from 6.12.2 up to 6.12.*
CVE List
linux linux_kernelfrom 5.15 before 5.15.174, from 5.16 before 6.1.120, from 6.2 before 6.6.64, from 6.7 before 6.11.11, from 6.12 before 6.12.2NVD

All scores

CISA-ADP3.3low CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-401

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: PCI: Corregir pérdida de memoria de reset_method_store() En reset_method_store(), se asigna una cadena a través de kstrndup() y se asigna a las "opciones" locales. Luego, se usa options con strsep() para buscar espacios: while ((name = strsep(&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és de kstrndup(). Se soluciona utilizando un tmp_options separado para iterar con strsep() de modo que se preserve options.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-56745 changed 2026-05-11CVE Terms of Use
NVDCVE-2024-56745 changed 2026-06-17Public domain