CVE-2024-50058: serial: protect uart_port_dtr_rts() in uart_shutdown() too
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.
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-50058?
CVE-2024-50058 has been classified as a moderate severity vulnerability in the Linux kernel.
What versions of the Linux kernel are affected by CVE-2024-50058?
CVE-2024-50058 affects Linux kernel versions earlier than 6.6.57 and those between 6.7 and 6.11.4.
How do I fix CVE-2024-50058?
To mitigate CVE-2024-50058, upgrade to Linux kernel versions 6.1.123-1, 6.1.128-1, 6.12.12-1, or 6.12.15-1, or use the exact remedy version as specified in the affected distribution.
Is CVE-2024-50058 related to unsafe uart port access?
Yes, CVE-2024-50058 addresses issues related to unsafe access to uart ports in the kernel.
What commit resolved CVE-2024-50058?
The vulnerability was resolved by commit af224ca2df29, which added checks to prevent unsafe uart port access.