]> git.ipfire.org Git - ipfire-2.x.git/commit
linux: Forbid legacy TIOCSTI usage
authorPeter Müller <peter.mueller@ipfire.org>
Sun, 14 Jan 2024 15:59:00 +0000 (15:59 +0000)
committerPeter Müller <peter.mueller@ipfire.org>
Tue, 16 Jan 2024 15:46:37 +0000 (15:46 +0000)
commitbca096b453809236775b497e0a3e4c7cd5e5437e
treead75b062e9bf4108ff4928b5141b4c2f87239c26
parent254dcbaac88865c7f5fbaaa4cf5a846545cf8a0b
linux: Forbid legacy TIOCSTI usage

To quote from the kernel documentation:

> Historically the kernel has allowed TIOCSTI, which will push
> characters into a controlling TTY. This continues to be used
> as a malicious privilege escalation mechanism, and provides no
> meaningful real-world utility any more. Its use is considered
> a dangerous legacy operation, and can be disabled on most
> systems.
>
> Say Y here only if you have confirmed that your system's
> userspace depends on this functionality to continue operating
> normally.
>
> Processes which run with CAP_SYS_ADMIN, such as BRLTTY, can
> use TIOCSTI even when this is set to N.
>
> This functionality can be changed at runtime with the
> dev.tty.legacy_tiocsti sysctl. This configuration option sets
> the default value of the sysctl.

This patch therefore proposes to no longer allow legacy TIOCSTI usage
in IPFire, given its security implications and the apparent lack of
legitimate usage.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/kernel/kernel.config.aarch64-ipfire
config/kernel/kernel.config.riscv64-ipfire
config/kernel/kernel.config.x86_64-ipfire
config/rootfiles/common/aarch64/linux
config/rootfiles/common/riscv64/linux
config/rootfiles/common/x86_64/linux