TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Heap-based buffer overflow in Sudo

400 点作者 ptype超过 4 年前

34 条评论

jeffbee超过 4 年前
All you need to know about sudo and frankly most other pieces of the Linux userspace is that it is undertested. The commit that added this flaw to sudo claims to fix a parser bug but includes no tests. There is no reason for the author, the reviewer (if there even was such a person), or anyone else to believe that the bug existed or was fixed by this change. The pull request that supposedly fixes this CVE also includes no tests. There is <i>no</i> reason anyone should believe this fix is effective or complete, or that it does not introduce new defects. This is the result of people who stubbornly refuse to practice even the most basic good engineering practices, like testing and code review, while at the same time using the industry&#x27;s most dangerous high-level language. As long as this type of thing continues, our tools will remain at a very low level of safety, reliability, and correctness.
评论 #25923348 未加载
评论 #25922689 未加载
评论 #25922029 未加载
评论 #25923608 未加载
评论 #25923155 未加载
评论 #25926453 未加载
评论 #25921910 未加载
评论 #25924658 未加载
评论 #25931483 未加载
评论 #25925816 未加载
评论 #25921917 未加载
mbrubeck超过 4 年前
Just ten days ago on Hacker News, we had a C programmer claiming that “buffer over-runs are a rare class of bugs, and a class of bugs that are (at least on the heap, and often on the stack) trivial to find and fix” [1].<p>As a bonus, the person who wrote that turned out to have published C code containing multiple exploitable buffer overflows.<p>[1]: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=25806533" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=25806533</a>
评论 #25925649 未加载
bluefox超过 4 年前
Every now and then we all get a glimpse, for a flash of a moment, that the house of cards has already collapsed. Too invested in our current systems to face this truth, we just update and forget about it until the next time.
评论 #25923778 未加载
tgbugs超过 4 年前
Yet another vindication for one of my long-standing practices. I try to avoid installing sudo at all cost on my systems because all it does is increase the attack surface.<p>Despite this, the wisdom of the crowd is that you should never su to root, for ... reasons? Fat fingering is a thing, but if you can accidentally be in a root terminal without realizing it you have done something horribly wrong.<p>Heck, from a certain point of view if you have someone in the habit of repeatedly typing sudo over and over again then all sudo has really done is open up every single terminal to be a gateway to the nether realm of super user privs. And in this case, more attack surface.
评论 #25922732 未加载
评论 #25923241 未加载
thricegr8超过 4 年前
Here is a non .txt format with a great video explanation as well: <a href="https:&#x2F;&#x2F;blog.qualys.com&#x2F;vulnerabilities-research&#x2F;2021&#x2F;01&#x2F;26&#x2F;cve-2021-3156-heap-based-buffer-overflow-in-sudo-baron-samedit" rel="nofollow">https:&#x2F;&#x2F;blog.qualys.com&#x2F;vulnerabilities-research&#x2F;2021&#x2F;01&#x2F;26&#x2F;...</a>
MayeulC超过 4 年前
Memory safety strikes again, it seems (overflow in a C string due to complex parameter parsing rules).
评论 #25921506 未加载
2bitencryption超过 4 年前
I&#x27;m curious, is this one implementation of sudo really used everywhere?<p>I was under the impression that different Linux userspaces sometimes implement these common commands differently. Like &quot;ls&quot; sometimes actually being aliased to a bash script, or maybe BSD having one implementation and Ubuntu another. Is that not the case? Is &quot;sudo&quot; not maintained by an entity like gnu, bsd, etc?<p>edit - in other words, I always assumed &quot;sudo&quot; was a highly-dependent system-level tool, not just some useful helper binary that is maintained by one independent person.
评论 #25920632 未加载
评论 #25920895 未加载
评论 #25920677 未加载
zaltekk超过 4 年前
&gt; introduced in July 2011 (commit 8255ed69), and affects all legacy versions from 1.8.2 to 1.8.31p2 and all stable versions from 1.9.0 to 1.9.5p1, in their default configuration.<p>It looks like this is pretty far reaching. All of my boxes were vulnerable to this before updating today.
statquontrarian超过 4 年前
How does this story not have a billion upvotes? HN should introduce sticky posts just for this bug and keep it at the top of the homepage for weeks.<p>&gt; exploitable by any local user [...] without authentication<p>&gt; introduced in July 2011 [...] in their default configuration<p>&gt; full root privileges
评论 #25922826 未加载
jart超过 4 年前
Developers: your moment has come at last to humble your local system administrator for wearing those &quot;I read your emails&quot; t-shirts. This is as day zero as day zero gets. Red Hat and Debian published their security announcements just two hours ago at the exact same moment this was posted on Hacker News. It would have been more responsible to keep something this bad under wraps a bit longer. Because all the people who still use things like cpanel virtual hosting are at risk.
评论 #25924303 未加载
zaltekk超过 4 年前
&gt; introduced in July 2011 (commit 8255ed69), and affects all legacy versions from 1.8.2 to 1.8.31p2 and all stable versions from 1.9.0 to 1.9.5p1, in their default configuration.<p>It looks like this is pretty far reaching. All of my boxes were vulnerable to this before updating today.
nickweb超过 4 年前
Is it normal for a security issue of this magnitude to have a 12 day notification period for everyone? That seems... short.
评论 #25921607 未加载
higerordermap超过 4 年前
At this point, can somebody recommend linux security best practices on desktop? I already have two user accounts one for important stuff and other for unimportant stuff. I prefer to use sandboxed apps, but flatpaks don&#x27;t look well maintained compared to official repositories, and often unofficial. Firejail seems quite controversial due to use of UserNS? What do veterans in security recommend for sandboxing of user apps?
cab404超过 4 年前
Never knew sudo had a site (<a href="https:&#x2F;&#x2F;sudo.ws" rel="nofollow">https:&#x2F;&#x2F;sudo.ws</a>).<p>Never knew it had a mascot, if you could call it so... I will never unsee it. Nightmare fuel at it&#x27;s finest.
评论 #25922158 未加载
评论 #25920835 未加载
评论 #25920953 未加载
Panino超过 4 年前
Qualys is great! Love their vulnerability reports.<p>Just want to echo other praise here for doas. It&#x27;s fantastic, most likely does everything you need it to do, and is secure. Install it and see for yourself!
评论 #25924743 未加载
fattire超过 4 年前
sudo built with ASLR doesn&#x27;t make a difference?<p>NM:<p>- we can defeat ASLR by partially overwriting the function pointer getenv_fn (which points to the function sudoers_hook_getenv() in the shared library sudoers.so); and luckily, the beginning of sudoers.so contains a call to execve() (or execv()):
评论 #25922957 未加载
nahuel0x超过 4 年前
&quot;rewrite sudo in Rust&quot; in 3,2...
评论 #25920660 未加载
评论 #25921278 未加载
YetAnotherNick超过 4 年前
From 2017, there are at least 5 discovered security issues in sudo[1]. It seems a bit too untested for something running in root and interacting with all users.<p>[1]: <a href="https:&#x2F;&#x2F;www.sudo.ws&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.sudo.ws&#x2F;</a>
评论 #25922994 未加载
0xbadcafebee超过 4 年前
I was trying to find results for PAM in CVEDB so I could go <i>&quot;Everybody&#x27;s freaking out about sudo but PAM ain&#x27;t no saint neither (<a href="https:&#x2F;&#x2F;cve.mitre.org&#x2F;cgi-bin&#x2F;cvekey.cgi?keyword=PAM" rel="nofollow">https:&#x2F;&#x2F;cve.mitre.org&#x2F;cgi-bin&#x2F;cvekey.cgi?keyword=PAM</a>)&quot;</i>, but sudo&#x27;s vulns seemed to really stack up last year: <a href="https:&#x2F;&#x2F;cve.mitre.org&#x2F;cgi-bin&#x2F;cvekey.cgi?keyword=sudo" rel="nofollow">https:&#x2F;&#x2F;cve.mitre.org&#x2F;cgi-bin&#x2F;cvekey.cgi?keyword=sudo</a>
Uptrenda超过 4 年前
Wow, this looks bad. Many VPS and shared hosting providers would be directly shellable with this. Even exploits that got you onto a web server with a limited web shell = full root. Alternatively, sites that already have shells from previous script kiddies can be escalated to root too. Not that I would advocate any of this ^_^ But there are many places where local access is required and you rely on permissions to work properly. A program as important as sudo (or wide spread) is not the kind of place you want to see a vuln this severe
bpiche超过 4 年前
Please let this be a reference to Count Zero and the loa of the matrix :(
ncmncm超过 4 年前
I don&#x27;t find bug reports for this in either Debian or Ubuntu bug tracking systems. When do these get entered?
评论 #25921079 未加载
评论 #25921691 未加载
netsec_burn超过 4 年前
Shouldn&#x27;t this affect macOS?
评论 #25920686 未加载
megous超过 4 年前
One of those programs that you should not install unless you really need them.
评论 #25920620 未加载
评论 #25926478 未加载
cyounkins超过 4 年前
What variant of `doas` do people run as an alternative? I see Duncaen&#x2F;OpenDoas, slicer69&#x2F;doas, multiplexd&#x2F;doas on GitHub. None seem super widely used as judged by watches&#x2F;stars&#x2F;forks.
评论 #25928915 未加载
评论 #25930769 未加载
cjohnson318超过 4 年前
Any idea why did they referenced Baron Samedi? <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Baron_Samedi" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Baron_Samedi</a>
评论 #25921759 未加载
评论 #25921923 未加载
krapp超过 4 年前
In case no one gets the pun: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Baron_Samedi" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Baron_Samedi</a>
评论 #25921035 未加载
评论 #25920959 未加载
tehjoker超过 4 年前
Are e.g. AWS, GCP, and Digital Ocean releasing emergency patches? I can&#x27;t find info.
jzer0cool超过 4 年前
Any list somewhere which provides a list of affected OSs or at least how to check?
评论 #25923907 未加载
评论 #25920865 未加载
pengaru超过 4 年前
There&#x27;s a reason my boxen have no sudo installed.
bolangi超过 4 年前
If little sudo has buffer overflows, what can we expect in the huge codebases of DBus and systemd?
mleonhard超过 4 年前
Is there a project to rewrite all of these Linux system utilities in forbid(unsafe) Rust?
eqvinox超过 4 年前
‹insert &quot;oh shit&quot; here›
syngrog66超过 4 年前
this doesnt surprise me<p>a few years ago I found a flaw in sshd. because it was impacting a Linux PAM login&#x2F;auth module I was writing in C. my module <i>should</i> have worked. but it wasnt. because of sshd. it blew me away, given how important that server is. luckily, others must have complained too, and it ended up being fixed in a newer sshd release. but the fact that it made it into a release in the first place, impacting PAM, was scary<p>on a not-totally-unrelated note, that was also the last C project I wrote, and since then I fell in love with Go and Rust. for systems code, for me, theres no going back. C is scary given the modern threat ecosystem and whats at stake