In the Linux kernel, the following vulnerability has been resolved:
usb: typec: tcpm: fix use-after-free case in tcpmregistersource_caps
There could be a potential use-after-free case in tcpmregistersourcecaps(). This could happen when: * new (say invalid) source caps are advertised * the existing source caps are unregistered * tcpmregistersourcecaps() returns with an error as usbpowerdeliveryregistercapabilities() fails
This causes port->partnersourcecaps to hold on to the now freed source caps.
Reset port->partnersourcecaps value to NULL after unregistering existing source caps.
[
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"16306696408544663918830912509042738738",
"307210408442751400486046878588807343539",
"72917851619028312309321750017512012873",
"64251679631129296636328327589951296581",
"257019542769691186894289858263039180935"
]
},
"id": "CVE-2024-40903-547cb8ac",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4053696594d7235f3638d49a00cf0f289e4b36a3",
"target": {
"file": "drivers/usb/typec/tcpm/tcpm.c"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "16308315076860079528688682519798156882",
"length": 639.0
},
"id": "CVE-2024-40903-7f68a0c2",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@04c05d50fa79a41582f7bde8a1fd4377ae4a39e5",
"target": {
"file": "drivers/usb/typec/tcpm/tcpm.c",
"function": "tcpm_register_sink_caps"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "16308315076860079528688682519798156882",
"length": 639.0
},
"id": "CVE-2024-40903-a2001056",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4053696594d7235f3638d49a00cf0f289e4b36a3",
"target": {
"file": "drivers/usb/typec/tcpm/tcpm.c",
"function": "tcpm_register_sink_caps"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"16306696408544663918830912509042738738",
"307210408442751400486046878588807343539",
"72917851619028312309321750017512012873",
"64251679631129296636328327589951296581",
"257019542769691186894289858263039180935"
]
},
"id": "CVE-2024-40903-c8cfd919",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@04c05d50fa79a41582f7bde8a1fd4377ae4a39e5",
"target": {
"file": "drivers/usb/typec/tcpm/tcpm.c"
}
}
]