Hacker Newsnew | past | comments | ask | show | jobs | submit | deadliftdouche's commentslogin


You are very unlikely to hit this bug in a real world Rust project while C/C++ you can easily hit by a memory safety bug.


Exactly, and also MIRI catches all of these, so with a tiny little extra effort world is in order again.

Moreover, if I remember correctly, they all are made possible by a single (long-standing) compiler bug that eventually will be fixed.

Previously discussed: https://news.ycombinator.com/item?id=39440808

I think this mindset is the big difference. We're not perfect, but we're working on it.


The bug used by that repository [1] isn't the only one that can be used to escape the Safe Rust type system. There are a couple others I've tried [2] [3], and the Rust issue tracker currently lists 92 unsoundness bugs (though only some of them are general-purpose escapes), and that's only the ones we know about.

These bugs are not really a problem in practice though as long as the developer is not malicious. However, they are a problem for supply chain security or any case where the Rust source is fully untrusted.

[1]: https://github.com/rust-lang/rust/issues/25860

[2]: https://github.com/rust-lang/rust/issues/57893

[3]: https://github.com/rust-lang/rust/issues/133361


Nice writeup and fuck Zendesk, this could have done so much damage.


We don't know if it hasn't to be honest. State actors and exploit sellers could have known about this bug for years and exploited it before it was found by this white hat



I don't understand, isn't this pointless? I could just change some other data structure or variable, hell, I'll just change the sudo input buffer size and do a stack overflow, or a memcpy size into a heap overflow, or what stops me changing a jne (Jump if Not Equal) instruction to a jg (Jump if Greater) and bypassing the if's?


I'd argue its worse than pointless, at best it does nothing and at worse it seems to make the code harder to understand and audit, which could result in more future vulnerabilities.


The associated paper abstract claims to have broken sudo by rowhammering register values. It stands to reason that these mitigations thwart the found attacks - the commit message points to the paper as the reason for these mitigations, after all.

Preventing known attacks is not pointless at all.


I think the point is that if your known attack I'd "target was shot in the right hand" making them wear a protective glove on their right hand isn't a good defense. You would want two protective gloves, a helmet and bulletproof vest.


Indeed. Trying to write code that can essentially work correctly with arbitrary memory corruption is not something that should even be attempted.


I'd recommend people also check out ishell https://github.com/abiosoft/ishell I've used it in a project before and absolutely loved the API + autocomplete functionality.


https://github.com/AlecAivazis/survey is a little bit better. I haven't compared it with promptui, yet, however.


Another one I came across recently was termui: https://github.com/gizak/termui


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: