[74] in linux-security and linux-alert archive
tty permissions
daemon@ATHENA.MIT.EDU (Marek Michalkiewicz)
Thu Mar 9 13:48:22 1995
To: linux-security@tarsier.cv.nrao.edu
Date: Thu, 9 Mar 1995 15:13:21 +0100 (MEZ)
From: Marek Michalkiewicz <ind43@ci3ux.ci.pwr.wroc.pl>
Reply-To: linux-security@tarsier.cv.nrao.edu
OK, since some people here don't like s****w passwords, I'm now going
to talk about something else. :-)
I see one security problem with the standard util-linux login. When
the user logs in, the permissions of this user's tty are set to 0622.
This allows anyone to write anything, including some dangerous control
codes (black text on black background, possibly redefine keys on some
terminal types) or "talk: respond with: talk president@whitehouse.gov"
(probably wouldn't work but you get the idea).
The reason is probably that "most Linux systems are single-user systems".
But I think it would be better if the permissions were set to 0620, group
"tty". Programs like write should be setgid tty and filter out control
characters (write in util-linux already does this).
In fact, the code to set right tty permissions exists in util-linux login.
You only need to change a few #ifdefs and change mesg so it can set right
permissions. Are there any good reasons it has not been done yet?
Regards,
--
Marek Michalkiewicz
marekm@i17linuxa.ists.pwr.wroc.pl || ind43@ci3ux.ci.pwr.wroc.pl