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.
[
{
"signature_type": "Function",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 603.0,
"function_hash": "69824003600903744681436455080902658186"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@76ed24a34223bb2c6b6162e1d8389ec4e602a290",
"target": {
"file": "drivers/tty/serial/serial_core.c",
"function": "uart_shutdown"
},
"id": "CVE-2024-50058-13147460"
},
{
"signature_type": "Line",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"33707815648366640244617293556755180699",
"187416329378394689846176129442151379666",
"223908266806927879558107846524432511813",
"229333782744297690435208314498104930987",
"221265072979600996332619897195194309178",
"260956772754921616201234634983196997956",
"236434020118149012828610077953833219932",
"240670951181665871569400971066985917225",
"70816055103925972854481134426263131756",
"61205258657760953741086700020055120331"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@76ed24a34223bb2c6b6162e1d8389ec4e602a290",
"target": {
"file": "drivers/tty/serial/serial_core.c"
},
"id": "CVE-2024-50058-193fb747"
},
{
"signature_type": "Function",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 729.0,
"function_hash": "51625878008054099374187316880238759145"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d7b5876a6e74cdf8468a478be6b23f2f5464ac7a",
"target": {
"file": "drivers/tty/serial/serial_core.c",
"function": "uart_shutdown"
},
"id": "CVE-2024-50058-20baac18"
},
{
"signature_type": "Line",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"32931135061726973951437064774500501537",
"315618518202173421157476420883858659952",
"224862723839919714010797493019253307216",
"229333782744297690435208314498104930987",
"221265072979600996332619897195194309178",
"260956772754921616201234634983196997956",
"145308246773574115414276930926882486243",
"309078588314030938088922265331859723653",
"168667996612816956344768887825634167431",
"138990220990343621047623951508977811260"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2fe399bb8efd0d325ab1138cf8e3ecf23a39e96d",
"target": {
"file": "drivers/tty/serial/serial_core.c"
},
"id": "CVE-2024-50058-559dc962"
},
{
"signature_type": "Function",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 771.0,
"function_hash": "261040974387330559138994836956298885195"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e418d91195d29d5f9c9685ff309b92b04b41dc40",
"target": {
"file": "drivers/tty/serial/serial_core.c",
"function": "uart_shutdown"
},
"id": "CVE-2024-50058-575305ec"
},
{
"signature_type": "Function",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 744.0,
"function_hash": "262486050683719016252685583366138229174"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2fe399bb8efd0d325ab1138cf8e3ecf23a39e96d",
"target": {
"file": "drivers/tty/serial/serial_core.c",
"function": "uart_shutdown"
},
"id": "CVE-2024-50058-81c8404f"
},
{
"signature_type": "Function",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 603.0,
"function_hash": "69824003600903744681436455080902658186"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@602babaa84d627923713acaf5f7e9a4369e77473",
"target": {
"file": "drivers/tty/serial/serial_core.c",
"function": "uart_shutdown"
},
"id": "CVE-2024-50058-ac145e2c"
},
{
"signature_type": "Line",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"33707815648366640244617293556755180699",
"187416329378394689846176129442151379666",
"223908266806927879558107846524432511813",
"229333782744297690435208314498104930987",
"221265072979600996332619897195194309178",
"260956772754921616201234634983196997956",
"236434020118149012828610077953833219932",
"240670951181665871569400971066985917225",
"70816055103925972854481134426263131756",
"61205258657760953741086700020055120331"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@602babaa84d627923713acaf5f7e9a4369e77473",
"target": {
"file": "drivers/tty/serial/serial_core.c"
},
"id": "CVE-2024-50058-c1fb005d"
},
{
"signature_type": "Line",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"32931135061726973951437064774500501537",
"315618518202173421157476420883858659952",
"224862723839919714010797493019253307216",
"229333782744297690435208314498104930987",
"221265072979600996332619897195194309178",
"260956772754921616201234634983196997956",
"145308246773574115414276930926882486243",
"309078588314030938088922265331859723653",
"168667996612816956344768887825634167431",
"138990220990343621047623951508977811260"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@399927f0f875b93f3d5a0336d382ba48b8671eb2",
"target": {
"file": "drivers/tty/serial/serial_core.c"
},
"id": "CVE-2024-50058-c3b3ed5a"
},
{
"signature_type": "Line",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"33707815648366640244617293556755180699",
"187416329378394689846176129442151379666",
"223908266806927879558107846524432511813",
"229333782744297690435208314498104930987",
"221265072979600996332619897195194309178",
"260956772754921616201234634983196997956",
"236434020118149012828610077953833219932",
"240670951181665871569400971066985917225",
"70816055103925972854481134426263131756",
"61205258657760953741086700020055120331"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e418d91195d29d5f9c9685ff309b92b04b41dc40",
"target": {
"file": "drivers/tty/serial/serial_core.c"
},
"id": "CVE-2024-50058-c729d507"
},
{
"signature_type": "Line",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"32931135061726973951437064774500501537",
"315618518202173421157476420883858659952",
"224862723839919714010797493019253307216",
"229333782744297690435208314498104930987",
"221265072979600996332619897195194309178",
"260956772754921616201234634983196997956",
"145308246773574115414276930926882486243",
"309078588314030938088922265331859723653",
"168667996612816956344768887825634167431",
"138990220990343621047623951508977811260"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d7b5876a6e74cdf8468a478be6b23f2f5464ac7a",
"target": {
"file": "drivers/tty/serial/serial_core.c"
},
"id": "CVE-2024-50058-dbb71ab8"
},
{
"signature_type": "Function",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 740.0,
"function_hash": "332674781253634227262436318360567586778"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@399927f0f875b93f3d5a0336d382ba48b8671eb2",
"target": {
"file": "drivers/tty/serial/serial_core.c",
"function": "uart_shutdown"
},
"id": "CVE-2024-50058-f3c8367a"
}
]