Potential Random console input overflow? #6046

Closed
opened 2026-01-31 00:28:30 +00:00 by claunia · 3 comments
Owner

Originally created by @DSLM82 on GitHub (Jan 19, 2020).

Consider the following Bash command line:

while [ loop != done]; do cat /dev/random; done

This will dump an endless string of random characters to the console forever.

After a few moments, this reliably results in the title bar in the terminal app changing and, shortly thereafter, the terminal hanging.

I wonder if this could be the basis for a buffer overflow, which if run against a terminal in privileged mode might potentially open an attack vector.

I've reproduced this in Kali and Ubuntu, as well as with a friend who tested it with a clean install of Terminal/Ubuntu.

Originally created by @DSLM82 on GitHub (Jan 19, 2020). Consider the following Bash command line: while [ loop != done]; do cat /dev/random; done This will dump an endless string of random characters to the console forever. After a few moments, this reliably results in the title bar in the terminal app changing and, shortly thereafter, the terminal hanging. I wonder if this could be the basis for a buffer overflow, which if run against a terminal in privileged mode might potentially open an attack vector. I've reproduced this in Kali and Ubuntu, as well as with a friend who tested it with a clean install of Terminal/Ubuntu.
claunia added the Resolution-Duplicate label 2026-01-31 00:28:30 +00:00
Author
Owner

@j4james commented on GitHub (Jan 23, 2020):

The title changing is to be expected. That's just the result of the random characters generating an OSC 2 escape sequence (which is used to set the title). The hanging is likely a duplicate of #4145 which was recently fixed by PR #4150. I can reproduce the hanging in a preview build (v0.8.10091.0), but it's no longer happening in the master build.

@j4james commented on GitHub (Jan 23, 2020): The title changing is to be expected. That's just the result of the random characters generating an OSC 2 escape sequence (which is used to set the title). The hanging is likely a duplicate of #4145 which was recently fixed by PR #4150. I can reproduce the hanging in a preview build (v0.8.10091.0), but it's no longer happening in the master build.
Author
Owner

@DHowett-MSFT commented on GitHub (Jan 23, 2020):

Indeed. I think this is likely to have been fixed as /dup #4145. Thanks @j4james for trying to repro.

@DHowett-MSFT commented on GitHub (Jan 23, 2020): Indeed. I think this is likely to have been fixed as /dup #4145. Thanks @j4james for trying to repro.
Author
Owner

@ghost commented on GitHub (Jan 23, 2020):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Jan 23, 2020): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#6046