[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230710002645.v565c7xq5iddruse@begin>
Date: Mon, 10 Jul 2023 02:26:45 +0200
From: Samuel Thibault <samuel.thibault@...-lyon.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Randy Dunlap <rdunlap@...radead.org>,
Jiri Slaby <jirislaby@...nel.org>,
Simon Brand <simon.brand@...tadigitale.de>,
Kees Cook <keescook@...omium.org>
Cc: linux-kernel@...r.kernel.org, Dave@...lke.cc
Subject: [PATCH] TIOCSTI: always enable for CAP_SYS_ADMIN
83efeeeb3d04 ("tty: Allow TIOCSTI to be disabled") broke BRLTTY's
ability to simulate keypresses on the console, thus effectively breaking
braille keyboards of blind users.
This restores the TIOCSTI feature for CAP_SYS_ADMIN processes, which
BRLTTY is, thus fixing braille keyboards without re-opening the security
issue.
Signed-off-by: Samuel Thibault <samuel.thibault@...-lyon.org>
Acked-by: Kees Cook <keescook@...omium.org>
Fixes: 83efeeeb3d04 ("tty: Allow TIOCSTI to be disabled")
Cc: stable@...r.kernel.org
Index: linux-6.4/drivers/tty/tty_io.c
===================================================================
--- linux-6.4.orig/drivers/tty/tty_io.c
+++ linux-6.4/drivers/tty/tty_io.c
@@ -2276,7 +2276,7 @@ static int tiocsti(struct tty_struct *tt
char ch, mbz = 0;
struct tty_ldisc *ld;
- if (!tty_legacy_tiocsti)
+ if (!tty_legacy_tiocsti && !capable(CAP_SYS_ADMIN))
return -EIO;
if ((current->signal->tty != tty) && !capable(CAP_SYS_ADMIN))
Powered by blists - more mailing lists