tty: clear cdev pointer after cdev_add() failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c1a752ba2d6b8a52879c7ab637cff38359ea9827 · < 4f6bd79bb7e55095f09bec9b4eb6c09df1306116| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
tty: clear cdev pointer after cdev_add() failure
tty_cdev_add() drops the cdev reference when cdev_add() fails, but leaves driver->cdevs[index] pointing to freed memory. tty_unregister_device() later passes that stale pointer to cdev_del(), causing a use-after-free.
Clear the slot after dropping the reference.
From the CVE record · Linux
A failed cdev_add() call can leave a freed pointer in the Linux kernel's tty device state. Later device unregistration can use that pointer, causing a use-after-free. The input does not specify how an attacker could trigger this, or whether access or user interaction is required.
Engineers running the Linux kernel should check their deployments; affected versions are not specified.