Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 28 Aug 2023 16:48:28 +0200
From: Greg KH <>
To: Günther Noack <>
Cc: Hanno Böck <>,,
	Kees Cook <>,
	Jiri Slaby <>,
	Geert Uytterhoeven <>,
	Paul Moore <>,
	Samuel Thibault <>,
	David Laight <>,
	Simon Brand <>,
	Dave Mielke <>,
	Mickaël Salaün <>,
	KP Singh <>,
	Nico Schottelius <>
Subject: Re: [PATCH v2 1/1] tty: Restrict access to TIOCLINUX' copy-and-paste

On Mon, Aug 28, 2023 at 02:21:09PM +0200, Günther Noack wrote:
> From: Hanno Böck <>
> TIOCLINUX can be used for privilege escalation on virtual terminals when
> code is executed via tools like su/sudo and sandboxing tools.
> By abusing the selection features, a lower-privileged application can
> write content to the console, select and copy/paste that content and
> thereby executing code on the privileged account. See also the poc
> here:
> Selection is usually used by tools like gpm that provide mouse features
> on the virtual console. gpm already runs as root (due to earlier
> changes that restrict access to a user on the current TTY), therefore
> it will still work with this change.
> With this change, the following TIOCLINUX subcommands require
>  * TIOCL_SETSEL - setting the selected region on the terminal
>  * TIOCL_PASTESEL - pasting the contents of the selected region into
>    the input buffer
>  * TIOCL_SELLOADLUT - changing word-by-word selection behaviour
> The security problem mitigated is similar to the security risks caused
> by TIOCSTI, which, since kernel 6.2, can be disabled with
> Signed-off-by: Hanno Böck <>
> Tested-by: Günther Noack <>

When you pass on a patch like this, you too need to sign off on it as
per the instructions in the DCO.  I'm pretty sure the Google open source
training also says that, but maybe not.  If not, it should :)


greg k-h

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.