Lucene search

K
vulnrichmentLinuxVULNRICHMENT:CVE-2023-52456
HistoryFeb 23, 2024 - 2:46 p.m.

CVE-2023-52456 serial: imx: fix tx statemachine deadlock

2024-02-2314:46:19
Linux
github.com
4
linux kernel
serial port
vulnerability
rs485
deadlock
imx_uart_stop_tx
state machine
tc interrupt

AI Score

6.8

Confidence

Low

EPSS

0

Percentile

5.1%

SSVC

Exploitation

none

Automatable

no

Technical Impact

partial

In the Linux kernel, the following vulnerability has been resolved:

serial: imx: fix tx statemachine deadlock

When using the serial port as RS485 port, the tx statemachine is used to
control the RTS pin to drive the RS485 transceiver TX_EN pin. When the
TTY port is closed in the middle of a transmission (for instance during
userland application crash), imx_uart_shutdown disables the interface
and disables the Transmission Complete interrupt. afer that,
imx_uart_stop_tx bails on an incomplete transmission, to be retriggered
by the TC interrupt. This interrupt is disabled and therefore the tx
statemachine never transitions out of SEND. The statemachine is in
deadlock now, and the TX_EN remains low, making the interface useless.

imx_uart_stop_tx now checks for incomplete transmission AND whether TC
interrupts are enabled before bailing to be retriggered. This makes sure
the state machine handling is reached, and is properly set to
WAIT_AFTER_SEND.

CNA Affected

[
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "cb1a60923609",
        "lessThan": "6e04a9d30509",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "cb1a60923609",
        "lessThan": "ff168d4fdb0e",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "cb1a60923609",
        "lessThan": "63ee7be01a3f",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "cb1a60923609",
        "lessThan": "763cd6874631",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "cb1a60923609",
        "lessThan": "9a662d06c22d",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "cb1a60923609",
        "lessThan": "78d60dae9a0c",
        "versionType": "git"
      }
    ],
    "programFiles": [
      "drivers/tty/serial/imx.c"
    ],
    "defaultStatus": "unaffected"
  },
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "5.9"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "5.9",
        "versionType": "custom"
      },
      {
        "status": "unaffected",
        "version": "5.10.209",
        "versionType": "custom",
        "lessThanOrEqual": "5.10.*"
      },
      {
        "status": "unaffected",
        "version": "5.15.148",
        "versionType": "custom",
        "lessThanOrEqual": "5.15.*"
      },
      {
        "status": "unaffected",
        "version": "6.1.75",
        "versionType": "custom",
        "lessThanOrEqual": "6.1.*"
      },
      {
        "status": "unaffected",
        "version": "6.6.14",
        "versionType": "custom",
        "lessThanOrEqual": "6.6.*"
      },
      {
        "status": "unaffected",
        "version": "6.7.2",
        "versionType": "custom",
        "lessThanOrEqual": "6.7.*"
      },
      {
        "status": "unaffected",
        "version": "6.8",
        "versionType": "original_commit_for_fix",
        "lessThanOrEqual": "*"
      }
    ],
    "programFiles": [
      "drivers/tty/serial/imx.c"
    ],
    "defaultStatus": "affected"
  }
]

AI Score

6.8

Confidence

Low

EPSS

0

Percentile

5.1%

SSVC

Exploitation

none

Automatable

no

Technical Impact

partial