News for hackers. Stuff that matters.
Re:The state of the kernel Rust experiment by yourdetect on Friday December 19, 2025 @03:14AM (#46323456)
The bug of that CVE has undefined behavior, so anything can in principle happen. You and Greg are sorely mistaken. And my post got downvoted.
Re:The state of the kernel Rust experiment by uecker on Friday December 19, 2025 @03:32AM (#46323560)
That is is undefined behavior does not mean it is exploitable. But I also have not seen an argument why a data race should not be exploitable in this context.
Re:The state of the kernel Rust experiment by yourdetect on Friday December 19, 2025 @03:43AM (#46323627)
I am very wary of going that route. If there is undefined behavior, the compiler is in principle allowed to do anything and everything, unless it promises something beyond what the language promises.

One could then argue that a specific version of a specific compiler with specific settings in a specific case, after investigation of the generated assembly or inspection of what guarantees the compiler provides beyond the language, is not exploitable. But other settings of the compiler and other versions of the compiler and other compilers may have different guarantees and generation of assembly.

The Linux kernel uses, as I understand it, a flag for GCC for C code that disables strict aliasing. That basically means that strict aliasing is no longer undefined behavior, as long as that flag is used. Basically a dialect of C.

Re:The state of the kernel Rust experiment by uecker on Friday December 19, 2025 @03:46AM (#46323648)
It is very common for C implementation to define undefined behavior and also common for C programs to rely on this. For this reason, I think it is very misleading to say that undefined behavior is automatically exploitable or even a bug.
Re:The state of the kernel Rust experiment by johncolanduoni on Friday December 19, 2025 @05:27AM (#46324252)
And the kernel is infamous for being picky about the C compilers it can be successfully built with - clang couldn’t build a working kernel for a long time, and it was mostly relying on subtle GCCisms.
Re:The state of the kernel Rust experiment by yourdetect on Friday December 19, 2025 @06:27AM (#46324619)
I think defining terminology here might help.

An attempt:

Language-UB (L-UB): UB according to the guarantees of the language.

Project-compiler-UB (PC-UB): The project picks compilers and compiler settings to create a stronger set of guarantees, that turns some language-UB into not being UB. Examples include turning off the strict aliasing requirement in the used compilers, or a compiler by default defining some language-UB as being defined behavior.

I do not know if such terms might catch on, though. Do they seem reasonable to you?

Re:The state of the kernel Rust experiment by testdelacc1 on Friday December 19, 2025 @04:35AM (#46323920)
> You and Greg are sorely mistaken.

Greg Kroah-Hartman has been a Linux kernel developer for 25 years, responsible for large parts of the kernel.

You’ve been a hacker news commenter for 1 day.

Could you pipe down with these wild claims that you know better than him?

Also, please don’t complain about downvotes. It’s tedious to read.

Re:The state of the kernel Rust experiment by yourdetect on Friday December 19, 2025 @06:22AM (#46324580)
Appeal to authority. And an appeal to authority where the authority is blatantly and clearly mistaken. If the code has UB, there is no guarantee from Rust's or rustc's sides that it will only crash.
Re:The state of the kernel Rust experiment by UltraSane on Friday December 19, 2025 @06:52AM (#46324805)
This is a valid appeal to genuine expertise not authority.
Re:The state of the kernel Rust experiment by josephg on Friday December 19, 2025 @06:38AM (#46324693)
Saying "appeal to authority" doesn't refute the point made above. Expertise is real. Someone with 25 years of experience with the linux kernel will know a lot more about linux and C than the average HN commenter. Almost certainly more than me.

Its possible that you might be right about whatever point you're trying to make. But if you are, I can't tell that from your comments. I can't even find a clear claim in your comments, let alone any substantive argument in support of that claim.

I'm unmoved and unimpressed.