Bug 2297487 (CVE-2024-40903) - CVE-2024-40903 kernel: usb: typec: tcpm: fix use-after-free case in tcpm_register_source_caps
Summary: CVE-2024-40903 kernel: usb: typec: tcpm: fix use-after-free case in tcpm_regi...
Keywords:
Status: NEW
Alias: CVE-2024-40903
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-07-12 13:25 UTC by OSIDB Bzimport
Modified: 2024-09-23 15:49 UTC (History)
4 users (show)

Fixed In Version: kernel 6.1.95, kernel 6.6.35, kernel 6.9.6, kernel 6.10-rc4
Doc Type: If docs needed, set a value
Doc Text:
A vulnerability was found in the tcpm_register_source_caps function in the Linux kernel's USB Type-C TCPM component. This issue arises when new, potentially invalid source capabilities are advertised while existing capabilities are unregistered, leading to a use-after-free condition if the registration fails.
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2024-07-12 13:25:46 UTC
In the Linux kernel, the following vulnerability has been resolved:

usb: typec: tcpm: fix use-after-free case in tcpm_register_source_caps

There could be a potential use-after-free case in
tcpm_register_source_caps(). This could happen when:
 * new (say invalid) source caps are advertised
 * the existing source caps are unregistered
 * tcpm_register_source_caps() returns with an error as
   usb_power_delivery_register_capabilities() fails

This causes port->partner_source_caps to hold on to the now freed source
caps.

Reset port->partner_source_caps value to NULL after unregistering
existing source caps.


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