Live data from Hacker News

You gave me a u32. I gave you root. (io_uring ZCRX freelist LPE)

ze3tar.github.io

91–100 of 152 posts

Re: You gave me a u32. I gave you root. (io_uring ZCRX freelist LPE)

#91
post #36

Earlier quoted context omitted.

Like they said, "no way to prevent this" (kind of bug from happening again).

Static analysis and other tools can find this, but they're expensive; wonder what the kernel team has access to?

Linus himself wrote a static analyzer. https://en.wikipedia.org/wiki/Sparse

There are other free ones, I don't know if they're run as a matter of course.

Re: You gave me a u32. I gave you root. (io_uring ZCRX freelist LPE)

#92

What is happening? I see multiple outages and CVEs is being reported on HN's front page. I've never seen these many security/incident related posts on HN's front page.

In some sense, I wonder if non-open-source is "safer" since LLMs can't mass scan the code for exploits.

Re: You gave me a u32. I gave you root. (io_uring ZCRX freelist LPE)

#93
Let's see... That's 4 Linux LPEs in the last 10 days?

Copy Fail [1]

Copy Fail 2: Electric Boogaloo [2]

Dirty Frag [3]

And now this...

[1]: https://copy.fail

[2]: https://github.com/0xdeadbeefnetwork/Copy_Fail2-Electric_Boo...

[3]: https://github.com/V4bel/dirtyfrag

Re: You gave me a u32. I gave you root. (io_uring ZCRX freelist LPE)

#94
post #63

Earlier quoted context omitted.

No they really don't. 95% of rust is safe rust[1]. Also unsafe rust doesn't remove bounds checks. arr[idx] is bounds checked in every context. You can opt out of array bounds checking by writing unsafe { arr.get_unchecked(idx) } . But thats incredibly rare in practice. [1] https://cs.stanford.edu/~aozdemir/blog/unsafe-rust-syntax/

> 95% of rust is safe rust. Based on the raw number of assorted crates, which has no bearing on kernel code. The more relevant question is, can a performant, cross-architecture, kernel ring-buffer be written in safe Rust?

Hubris, an embedded RTOS-like used in production by Oxide, has ~4% unsafe code in the kernel last I checked. There’s a ring buffer implementation that has one unsafe, for unchecked indexing: https://github.com/oxidecomputer/hubris/blob/master/lib/ring... (this of course does not mean that it is the one ring buffer to rule them all, but it’s to demonstrate that yes, it is at least possible to have one with minimum unsafe.)

It’s always a way lower number than folks assume. Even in spaces that have higher than average usage.

Re: You gave me a u32. I gave you root. (io_uring ZCRX freelist LPE)

#95
post #92

What is happening? I see multiple outages and CVEs is being reported on HN's front page. I've never seen these many security/incident related posts on HN's front page.

In some sense, I wonder if non-open-source is "safer" since LLMs can't mass scan the code for exploits.

Maybe for a while, but there's nothing stopping LLMs from examining disassembler output.

Re: You gave me a u32. I gave you root. (io_uring ZCRX freelist LPE)

#96

Earlier quoted context omitted.

Static analysis and other tools can find this, but they're expensive; wonder what the kernel team has access to?

If static analysis could actually find these issues with a reasonable false positive rate, the companies behind them would be running them on Linux to get the publicity of having found the issues like all the AI companies are doing now. Imo the good static analysis heuristics are already built into compilers or in open source linters.

[deleted]

Re: You gave me a u32. I gave you root. (io_uring ZCRX freelist LPE)

#97
post #71

Earlier quoted context omitted.

Exactly; I feel like a lot of people seem to misunderstand what Rust is trying to solve. It's fundamentally not trying to make unsafe code impossible; it's making the number of places you need to audit it a tiny fraction of your codebase compared to needing to audit the entirety of a C or C++ codebase. When I'm doing code reviews, you'd better believe I'm going to spend some extra time on any unsafe block I see to fi…

The thing is you can actually write quite good C code (see OpenBSD project). The power of C is that it's pragmatic. It lets you write code with you taking the full responsibility of being a responsible person. To err is human, but we developed a set of practices to handle this (by making sure the gun is unloaded and the safety is on before storing it to avoid putting holes in feet). I like type checking and other com…

> To err is human

Yes, which is precisely why I write in Rust, because the compiler errs less than I do.

Re: You gave me a u32. I gave you root. (io_uring ZCRX freelist LPE)

#98

What is happening? I see multiple outages and CVEs is being reported on HN's front page. I've never seen these many security/incident related posts on HN's front page.

It's actually the perfect evergreen content to discuss on HN in an age where so much else is AI generated.

Re: You gave me a u32. I gave you root. (io_uring ZCRX freelist LPE)

#100

Earlier quoted context omitted.

Falling apart? You mean getting stronger? Every single one of these is an existing hole being patched. It isn't making new holes

Government agencies probably already have half of these exploits in their private toolbox for years now. Finding and patching them is good, but there probably needs to be some systematic change to prevent them rather than just patching bugs when they get found.

> for years now ZCRX is less than half a year old. I'm so tired boss.
Post reply on HN