tty: skip cdev_del() when no cdev is registered
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ a3a10ce3429e5dee623ad5c8407ea58e204fcb0a · < c3b5623fd97648f2747444aa8932ae604662df93| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
tty: skip cdev_del() when no cdev is registered
TTY device registration can fail before a cdev is allocated. Serial core keeps the port so setserial can still use it, and later removal passes the NULL cdev slot to cdev_del(), causing a NULL-pointer dereference.
Only delete the cdev when the slot is not NULL.
From the CVE record · Linux
TTY device registration can fail before a character device is allocated, while serial core retains the port. Later removal can pass a NULL slot to cdev_del(), causing a NULL-pointer dereference; the input does not specify attacker access requirements or user interaction.
Engineers running the Linux kernel should check whether their builds include the affected TTY code; affected versions are not specified.