# CVE-2024-40903: usb: typec: tcpm: fix use-after-free case in tcpm_register_source_caps

- Severity: High 7.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.28%, higher than 22% of CVEs (2026-12-01)
- Published: 2024-07-12T12:20:44.367Z
- Modified: 2026-06-17T07:46:49.857Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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.

(As written by CVE List.)

## Affected

- Linux Linux: from cfcd544a9974c6b6fb37ca385146e4796dcaf66d before 4053696594d7235f3638d49a00cf0f289e4b36a3; from b16abab1fb645c4b7a86c357dc83a48cf21c2795 before 04c05d50fa79a41582f7bde8a1fd4377ae4a39e5; from 230ecdf71a644c9c73e0e6735b33173074ae3f94 before 6b67b652849faf108a09647c7fde9b179ef24e2b; from 230ecdf71a644c9c73e0e6735b33173074ae3f94 before e7e921918d905544500ca7a95889f898121ba886; 931b5f302d6f7126dbd6879c42d3d6ca580be423; from 6.1.91 before 6.1.95; from 6.6.31 before 6.6.35; from 6.8.10 before 6.9; 6.9 (not affected: before 6.9; from 6.1.95 up to 6.1.*; from 6.6.35 up to 6.6.*; from 6.9.6 up to 6.9.*; from 6.10 up to *)
- linux linux_kernel: from 6.1.61 before 6.1.95; from 6.6.31 before 6.6.35; from 6.9 before 6.9.6; 6.10

## References

- <https://git.kernel.org/stable/c/4053696594d7235f3638d49a00cf0f289e4b36a3> (patch)
- <https://git.kernel.org/stable/c/04c05d50fa79a41582f7bde8a1fd4377ae4a39e5> (patch)
- <https://git.kernel.org/stable/c/6b67b652849faf108a09647c7fde9b179ef24e2b> (patch)
- <https://git.kernel.org/stable/c/e7e921918d905544500ca7a95889f898121ba886> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Sources

- CVE List: [CVE-2024-40903](https://www.cve.org/CVERecord?id=CVE-2024-40903), CVE Terms of Use, modified 2026-05-23
- NVD: [CVE-2024-40903](https://nvd.nist.gov/vuln/detail/CVE-2024-40903), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-40903 · Whole record: https://cve.day/CVE-2024-40903.json · Rebuilt by cve.day 2026-11-25T22:58:42.828Z
