In the Linux kernel, the following vulnerability has been resolved:
serial: protect uartportdtrrts() in uartshutdown() too
Commit af224ca2df29 (serial: core: Prevent unsafe uart port access, part 3) added few uport == NULL checks. It added one to uartshutdown(), so the commit assumes, uport can be NULL in there. But right after that protection, there is an unprotected "uartportdtrrts(uport, false);" call. That is invoked only if HUPCL is set, so I assume that is the reason why we do not see lots of these reports.
Or it cannot be NULL at this point at all for some reason :P.
Until the above is investigated, stay on the safe side and move this dereference to the if too.
I got this inconsistency from Coverity under CID 1585130. Thanks.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/50xxx/CVE-2024-50058.json"
}[
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"32931135061726973951437064774500501537",
"315618518202173421157476420883858659952",
"224862723839919714010797493019253307216",
"229333782744297690435208314498104930987",
"221265072979600996332619897195194309178",
"260956772754921616201234634983196997956",
"145308246773574115414276930926882486243",
"309078588314030938088922265331859723653",
"168667996612816956344768887825634167431",
"138990220990343621047623951508977811260"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"id": "CVE-2024-50058-559dc962",
"target": {
"file": "drivers/tty/serial/serial_core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2fe399bb8efd0d325ab1138cf8e3ecf23a39e96d"
},
{
"signature_version": "v1",
"digest": {
"length": 744.0,
"function_hash": "262486050683719016252685583366138229174"
},
"deprecated": false,
"signature_type": "Function",
"id": "CVE-2024-50058-81c8404f",
"target": {
"function": "uart_shutdown",
"file": "drivers/tty/serial/serial_core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2fe399bb8efd0d325ab1138cf8e3ecf23a39e96d"
}
]
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-50058.json"