Bug 219048 - pty opened by XTerm is not owned by group `tty' and is world writable
pty opened by XTerm is not owned by group `tty' and is world writable
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: xterm (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Miroslav Lichvar
impact=low,source=redhat,reported=200...
: Reopened, Security
Depends On:
Blocks: 220153
  Show dependency treegraph
 
Reported: 2006-12-09 21:31 EST by Kasper Dupont
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-01-09 12:08:04 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Kasper Dupont 2006-12-09 21:31:43 EST
Description of problem:
mesg n does not actually prevent messages, and mesg y consistently produce an
error message.

Version-Release number of selected component (if applicable):
SysVinit-2.86-2.2.2

How reproducible:
Happens every time

Steps to Reproduce:
1. Open xterm
2. Type "mesg y"
  
Actual results:
mesg: error: tty device is not owned by group `tty'

Expected results:
No errors

Steps to Reproduce:
1. Open xterm
2. Type "mesg n"
3. ls -l $(tty)
  
Actual results:
crw-----w- 1 kasperd kasperd 136, 14 Dec  9 18:26 /dev/pts/14

Expected results:
No write permission for others

Additional info:
Even when messages are enabled, it is a bad idea to allow every user to write
the device directly. The write command makes it clear that a message was send,
and who did it. Direct writes can be used to fake tty output.
Comment 1 Bill Nottingham 2006-12-11 15:27:17 EST
I can't reproduce this, although this is on FC6:

[notting@nostromo: ~]$ ls -l $(tty)
crw--w---- 1 notting tty 136, 2 Dec 11 15:23 /dev/pts/2
[notting@nostromo: ~]$ mesg n
[notting@nostromo: ~]$ ls -l $(tty)
crw------- 1 notting tty 136, 2 Dec 11 15:23 /dev/pts/2
[notting@nostromo: ~]$ mesg y
[notting@nostromo: ~]$ ls -l $(tty)
crw--w---- 1 notting tty 136, 2 Dec 11 15:23 /dev/pts/2

What sort of tty rules do you have in /etc/udev/rules.d?
Comment 2 Kasper Dupont 2006-12-11 23:44:18 EST
I have just the /etc/udev/rules.d/50-udev.rules from udev-084-13.fc5.2
Comment 3 Harald Hoyer 2006-12-12 10:33:15 EST
ownership and permissions of ptys are not set by udev, afaik
Comment 4 Bill Nottingham 2006-12-12 11:47:26 EST
What's your line for /dev/pts in /etc/fstab?
Comment 5 Kasper Dupont 2006-12-13 01:19:44 EST
[kasperd@localhost:pts/7:~] grep pts /etc/fstab
/dev/devpts             /dev/pts                devpts  gid=5,mode=620  0 0
[kasperd@localhost:pts/7:~] 
Comment 6 Harald Hoyer 2006-12-13 05:45:01 EST
/dev/pts is not managed by udev
Comment 7 Kasper Dupont 2006-12-13 23:55:12 EST
I just noticed that I can only reproduce the problem in xterm. Konsole, script,
and screen are not affected by this.
Comment 8 Lubomir Kundrak 2006-12-19 05:50:53 EST
mlichvar reported that only FC6, FC5 and RHEL5 are affected.
The problem is caused by obsolete patch for configure script that is no longer
needed.
Comment 9 Lubomir Kundrak 2007-01-09 06:55:02 EST
Fixed in

xterm-223-1.fc5
xterm-223-1.fc6

Removing "Security sensitive" flag.
Comment 10 Fedora Update System 2007-01-09 11:54:04 EST
xterm-223-1.fc5 has been pushed for fc5, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.