vt: stabilize tty reference in kbd_keycode with tty_port_tty_get
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < b664592e9ba8c47c9e23408db7ba52eb9f946c8a| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
vt: stabilize tty reference in kbd_keycode with tty_port_tty_get
kbd_keycode() reads vc->port.tty without acquiring a tty reference, racing against con_shutdown() which clears port.tty under a different lock. Use tty_port_tty_get()/tty_kref_put() to hold a proper reference for the duration the tty pointer is needed.
From the CVE record · Linux
The Linux kernel’s kbd_keycode() reads a tty pointer without holding a reference. If keycode handling overlaps with console shutdown, the pointer can be cleared while it is in use. The input does not specify attacker access, authentication, or user-interaction requirements.
Engineers running Linux kernels with virtual terminal keyboard handling should check their kernel; affected versions are not specified.