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.
Metrics
Affected Vendors & Products
References
History
Tue, 07 Jan 2025 23:15:00 +0000
Type | Values Removed | Values Added |
---|---|---|
First Time appeared |
Linux
Linux linux Kernel |
|
Weaknesses | CWE-401 | |
CPEs | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | |
Vendors & Products |
Linux
Linux linux Kernel |
Mon, 30 Dec 2024 14:00:00 +0000
Type | Values Removed | Values Added |
---|---|---|
References |
| |
Metrics |
threat_severity
|
cvssV3_1
|
Sun, 29 Dec 2024 11:45:00 +0000
Type | Values Removed | Values Added |
---|---|---|
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. | |
Title | PCI: Fix reset_method_store() memory leak | |
References |
|
|
MITRE
Status: PUBLISHED
Assigner: Linux
Published: 2024-12-29T11:30:12.434Z
Updated: 2024-12-29T11:30:12.434Z
Reserved: 2024-12-29T11:26:39.758Z
Link: CVE-2024-56745
Vulnrichment
No data.
NVD
Status : Analyzed
Published: 2024-12-29T12:15:07.937
Modified: 2025-01-07T22:47:40.577
Link: CVE-2024-56745
Redhat