linux/drivers/tty
Wang Zihan e62745dd11 vt: add mode validation in vt_setactivate
The vt_setactivate() function accepts any mode value without validation,
while VT_SETMODE correctly rejects invalid values (only VT_AUTO and
VT_PROCESS are valid).

This allows users to set invalid mode values (e.g., 0xFF) which bypasses
VT_PROCESS signal handling and causes undefined VT switching behavior.

Fix this by adding the same validation as VT_SETMODE.

Signed-off-by: Wang Zihan <jiyu03@qq.com>
Link: https://patch.msgid.link/tencent_6A7DAE2E1288663D23AACBE2950D6E535007@qq.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-31 15:17:23 +02:00
..
hvc tty: hvc: restrict HVC_DCC to ARMv6+ and ARM64 2026-07-17 13:03:42 +02:00
ipwireless Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
serdev serdev: acpi: Free resource list at appropriate time 2026-07-10 14:43:31 +02:00
serial serial: qcom-geni: Keep FIFO RX active during console TX 2026-07-30 17:00:17 +02:00
vt vt: add mode validation in vt_setactivate 2026-07-31 15:17:23 +02:00
amiserial.c tty: amiserial: replace get_zeroed_page() with kzalloc() 2026-07-07 17:21:31 +02:00
ehv_bytechan.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
goldfish.c Merge 7.2-rc3 into tty-next 2026-07-13 07:11:57 +02:00
Kconfig tty: synclink_gt: remove broken driver 2026-05-11 16:55:56 +02:00
Makefile tty: synclink_gt: remove broken driver 2026-05-11 16:55:56 +02:00
mips_ejtag_fdc.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
moxa.c tty: moxa: use guard()s 2025-11-21 18:30:40 +01:00
mxser.c mxser: use guard()s 2025-08-17 12:46:26 +02:00
n_gsm.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
n_hdlc.c tty: synclink_gt: remove broken driver 2026-05-11 16:55:56 +02:00
n_null.c
n_tty.c tty: n_tty: use guard()s 2025-11-21 18:30:40 +01:00
nozomi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pty.c tty: tty_port: add workqueue to flip TTY buffer 2026-03-12 15:26:29 +01:00
rpmsg_tty.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sysrq.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
tty_audit.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
tty_baudrate.c
tty_buffer.c tty: tty_port: add workqueue to flip TTY buffer 2026-03-12 15:26:29 +01:00
tty_io.c tty: tty_port: add workqueue to flip TTY buffer 2026-03-12 15:26:29 +01:00
tty_ioctl.c tty: simplify throttling using guard()s 2025-04-25 13:46:30 +02:00
tty_jobctrl.c tty: tty_jobctrl: use guard() in tiocgsid() 2026-07-07 17:22:45 +02:00
tty_ldisc.c tty: constify tty_ldisc_ops 2026-03-12 15:05:34 +01:00
tty_ldsem.c tty/ldsem: Remove unused ldsem_down_write_trylock 2025-02-04 14:38:42 +01:00
tty_mutex.c
tty_port.c tty: tty_port: add workqueue to flip TTY buffer 2026-03-12 15:26:29 +01:00
tty.h
ttynull.c
vcc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00