Bug 2334825 (CVE-2024-56745) - CVE-2024-56745 kernel: PCI: Fix reset_method_store() memory leak
Summary: CVE-2024-56745 kernel: PCI: Fix reset_method_store() memory leak
Keywords:
Status: NEW
Alias: CVE-2024-56745
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-12-29 12:02 UTC by OSIDB Bzimport
Modified: 2024-12-30 04:02 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2024-12-29 12:02:27 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.

Comment 1 Avinash Hanwate 2024-12-30 03:59:23 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2024122926-CVE-2024-56745-b06b@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.