4 ms·
Is it worrisome that the Debian distribution comes with a package with this note in the README Decide for yourself, of course, but it looks safe to me - t
by tejasmanohar 9y ago
Is it worrisome that the Debian distribution comes with a package with this note in the README
Decide for yourself, of course, but it looks safe to me -
there's only one buffer and fgets doesn't let it overflow,
there's only one file opening, and while there is a
potential race condition there, it's with /dev/console.
If someone can exploit this race by replacing /dev/console,
you've got bigger problems. :)
It also appears /dev/console is overridable, https://github.com/johnath/beep/blob/master/beep.c#L149 https://github.com/johnath/beep/blob/master/beep.c#L149.
- master-litty 9y agoIt illustrates the author's attention to safety and security. Opposite of worrisome, even if it turned out exploitable. True but same idea applies. If your end device is maliciously replaceable you've got bigger problems.
- jesboat 9y agoFWIW, that comment was written before the option to control the path beep uses was added. Without the option to control the path, the potential race is only exploitable by somebody who can write to /dev, in which case that person is already root.