OS X Darwin: Disrupting Terminal Sessions Across User Identities
How, in Brief:
cat < /dev/ttys_, in Terminal.
This OS X 10.9.2 Darwin behaviour seems odd to me, and I would like to understand why it is happening, and whether or not it is an actual OS or Application bug.
Steps to Reproduce Behavior
- open two Terminal windows.
- Note their device paths, i.e. "
- In one Terminal window (i.e.
sudo -u [some other user] sh.
- In the other Terminal window (i.e.
cat < /dev/ttys001(or whatever the device path is.)
- Back in the first window, type text.
When I type text in the relevant Terminal window, there is a noticeable lag; additionally, the characters do not appear reliably in either window. Some characters are echoed to the second window, some appear in the first window, and some seem to vanish.
The reason this concerns me is that it appears that a simple command executed by one unprivileged user can completely disrupt the session of another user.
Anticipated Possible Causes
- A text input bug in Terminal 2.4 (326)
- A user privledges bug in OS X 10.9.2 Darwin