On 2023-11-01, Kenny McCormack <
[email protected]> wrote:
Consider the following (C) code:
char c = 'A';
if (ioctl(0,TIOCSTI,&c)) perror("ioctl");
This works fine if the tty open on fd 0 is the current tty or if the effective uid is 0.
Even under those conditions, it is a security hole.
Programs from different security domains share the same terminal.
For instance superuser can "su" to Mallory's account and run some
program as that user, then exit. What if that program pushes the
characters "rm -rf /bin\n" into the TTY.
--
TXR Programming Language:
http://nongnu.org/txr
Cygnal: Cygwin Native Application Library:
http://kylheku.com/cygnal
Mastodon: @
[email protected]
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)