{"id":"CVE-2024-40903","summary":"usb: typec: tcpm: fix use-after-free case in tcpm_register_source_caps","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: typec: tcpm: fix use-after-free case in tcpm_register_source_caps\n\nThere could be a potential use-after-free case in\ntcpm_register_source_caps(). This could happen when:\n * new (say invalid) source caps are advertised\n * the existing source caps are unregistered\n * tcpm_register_source_caps() returns with an error as\n   usb_power_delivery_register_capabilities() fails\n\nThis causes port-\u003epartner_source_caps to hold on to the now freed source\ncaps.\n\nReset port-\u003epartner_source_caps value to NULL after unregistering\nexisting source caps.","modified":"2026-04-02T12:17:17.799099Z","published":"2024-07-12T12:20:44.367Z","related":["SUSE-SU-2024:2894-1","SUSE-SU-2024:2939-1","SUSE-SU-2024:2947-1","SUSE-SU-2024:3194-1","SUSE-SU-2024:3195-1","SUSE-SU-2024:3383-1","SUSE-SU-2025:20044-1","SUSE-SU-2025:20047-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/40xxx/CVE-2024-40903.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/04c05d50fa79a41582f7bde8a1fd4377ae4a39e5"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4053696594d7235f3638d49a00cf0f289e4b36a3"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6b67b652849faf108a09647c7fde9b179ef24e2b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e7e921918d905544500ca7a95889f898121ba886"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/40xxx/CVE-2024-40903.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-40903"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"cfcd544a9974c6b6fb37ca385146e4796dcaf66d"},{"fixed":"4053696594d7235f3638d49a00cf0f289e4b36a3"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"b16abab1fb645c4b7a86c357dc83a48cf21c2795"},{"fixed":"04c05d50fa79a41582f7bde8a1fd4377ae4a39e5"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"230ecdf71a644c9c73e0e6735b33173074ae3f94"},{"fixed":"6b67b652849faf108a09647c7fde9b179ef24e2b"},{"fixed":"e7e921918d905544500ca7a95889f898121ba886"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"0"},{"last_affected":"931b5f302d6f7126dbd6879c42d3d6ca580be423"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-40903.json"}}],"schema_version":"1.7.5"}