GNOME Bugzilla – Bug 350487
Unreadable text after cat /dev/urandom
Last modified: 2006-08-08 21:24:07 UTC
Please describe the problem: After doing `cat /dev/urandom` in a terminal window, and then stopping the output with Ctrl+C, the text entered to the terminal AFTER those actions and text printed gets compromised. http://stuff.klaidas.tinkle.lt/terminal.jpg This bug was originally reported in Ubuntu: https://launchpad.net/distros/ubuntu/+source/gnome-terminal/+bug/55704 Steps to reproduce: 1. Command "cat /dev/urandom" 2. Ctrl+C to stop it 3. Try executing any command Actual results: Expected results: Does this happen every time? Other information:
Marking this bug as invalid, you shouldn't cat random stuff to the terminal. Note that you may be interested in bug 12870 though.
Just to follow up on what's happening here, this a fairly common result of dumping binary to any *terminal* that is configured to accept vt control sequences. If the binary data happens to look like a vt control sequence, that control action (change text mode or window title, etc) will be performed as usual. The only thing that makes this surprising to some is the fact that the text in a terminal can affect properties of the terminal itself. But otherwise, it would be like having your shell use /dev/urandom as input and observing that /etc went away if the random data happened to contain the string "rm -rf /etc".
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of 127870 ***