From 4d622b7ebe9f3e049961afb3ad5b6f65a6ef47c7 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 6 Apr 2021 10:13:38 +0000 Subject: [PATCH] sysctl.conf: prevent autoloading of TTY line disciplines This reverts commit a9d90b1b3f76a76b96a169e91cf3902e4cc0835b. Signed-off-by: Michael Tremer --- config/etc/sysctl.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/etc/sysctl.conf b/config/etc/sysctl.conf index c9b4c092af..832ad3d1c2 100644 --- a/config/etc/sysctl.conf +++ b/config/etc/sysctl.conf @@ -39,6 +39,10 @@ net.bridge.bridge-nf-call-ip6tables = 0 net.bridge.bridge-nf-call-iptables = 0 net.bridge.bridge-nf-call-arptables = 0 +# Restrict loading TTY line disciplines to CAP_SYS_MODULE to prevent unprivileged attackers +# from loading vulnerable line disciplines with the TIOCSETD ioctl. +dev.tty.ldisc_autoload = 0 + # Try to keep kernel address exposures out of various /proc files (kallsyms, modules, etc). kernel.kptr_restrict = 2 -- 2.39.5