4 ms·
> Sudo has displayed an endless parade of heap overflows and suchlike. sudo is 43 years old though > It is written in the extreme YOLO style by people with ve
by peoplefromibiza 3y ago
> Sudo has displayed an endless parade of heap overflows and suchlike.
sudo is 43 years old though
> It is written in the extreme YOLO style by people with very poor taste.
Sounds a bit exaggerated to me. Do you happen to have data on this?
- Veserv 3y agoHow many hundreds of thousands of lines of code do you think sudo is? How many hundreds of thousands of lines of churn do you think happen per year in sudo? If your answer is: What do you mean hundreds of thousands? That is the right question, but the wrong answer. The answers being around ~500,000 and on average ~200,000, including this year, respectively. In contrast, OpenBSD doas, which exists to serve the same primary purpose of executing commands as a super user, clocks in somewhere around a few hundred to maybe 1 or 2 thousand lines total just eyeballing it.
- 0cf8612b2e1e 3y agoI must have a fundamental misunderstanding of exactly what sudo does. That is so much code.
- j16sdiz 3y agosudo integrates with PAM, parse command, sends email, record session logs, do IPC.....
- littlestymaar 3y agoTurns out even in the 80s the so-called “UNIX philosophy” wasn't so ubiquitous…
- peoplefromibiza 3y ago> In contrast, OpenBSD doas That's my point, sudo survived 43 years, had to support a myriad of different platforms and configurations, doas was started in 2015. incidentally OpenDoas is written in C too. We'll see in 35 years how doas is doing.
- lelanthran 3y ago> If your answer is: What do you mean hundreds of thousands? That is the right question, but the wrong answer. The answers being around ~500,000 and on average ~200,000, including this year, respectively. > In contrast, OpenBSD doas, which exists to serve the same primary purpose of executing commands as a super user, clocks in somewhere around a few hundred to maybe 1 or 2 thousand lines total just eyeballing it. It seems to me, with those numbers, that the big problem with sudo is not the language it is written in but the extremely large attack surface. I would guess that for 1 out of every million invocations of sudo, all that extra functionality is needed. For the rest of the time, its merely being used to execute a single command as root. We could make systems more secure by simply removing sudo from those systems that don't use that extra functionality, and replace it with doas.
- jeffbee 3y ago> Do you happen to have data on this? Writing security-critical software entirely in C is prima facie evidence of a disqualifying lack of good taste.
- c_crank 3y agoMost software that handles actual human lives on the line is not written in plain C. Writing 'security critical' software in C is a trade off - many people are willing to accept extra defects in return for the benefits of the C ABI and performance.