News for hackers. Stuff that matters.
Re:Pre-auth RCE in Nginx HTTP/2 handling by vlovich123 on Wednesday November 18, 2026 @11:51AM (#50548629)
I don’t know any systems programming language that doesn’t ignore integer overflow/underflow in release builds. IMHO this is a CPU design flaw - integer operations should carry a flag indicating if the operation is allowed to wrap or if it should generate a trap. Then there wouldn’t be a performance penalty for this and languages like Rust could have it be trapped by default.
Re:Pre-auth RCE in Nginx HTTP/2 handling by codedokode on Wednesday November 18, 2026 @11:55AM (#50548675)
"I don't know any decent language so let's continue using poorly designed languages". Please look at Swift, Javascript, Python.

Why would CPU designers make a trap if languages do not require it?

Re:Pre-auth RCE in Nginx HTTP/2 handling by vlovich123 on Wednesday November 18, 2026 @11:58AM (#50548723)
JavaScript and Python aren’t systems languages. Swift often pays the performance penalty for trapping everywhere and hasn’t seen adoption as a systems language for that reason.
Re:Pre-auth RCE in Nginx HTTP/2 handling by pixl97 on Wednesday November 18, 2026 @12:02PM (#50548787)
How does that saying go?

"Go fast and get your things broken into"

Re:Pre-auth RCE in Nginx HTTP/2 handling by AnthonyMouse on Wednesday November 18, 2026 @02:30PM (#50550920)
We're after a way to go fast without having your things broken into. "Language allows you to specify whether you want wrap around or an exception and hardware makes implementing that efficient" is better than both inefficient runtime checks and silent data corruption.
Re:Pre-auth RCE in Nginx HTTP/2 handling by codedokode on Wednesday November 18, 2026 @09:46PM (#50555436)
Yes, so "+" should trap, and there should be a function that wraps around because wraparound addition is used very rarely (mostly in crypto). It seems that you agree that C is designed the wrong way.
Re:Pre-auth RCE in Nginx HTTP/2 handling by tptacek on Wednesday November 18, 2026 @11:54AM (#50548674)
No. Memory safe languages still have integer handling issues, but the consequences are different. In a memory-unsafe language, integer mishandling often nets out to bad copies and memory corruption.
Re:Pre-auth RCE in Nginx HTTP/2 handling by vlovich123 on Wednesday November 18, 2026 @12:01PM (#50548780)
I wouldn’t be sure that a Rust equivalent would be immune because it’s not hard to imagine an underflow/overflow from reaching an unsafe block that’s used for performance (the implicated TLS path would be a hotspot worthy of such a choice).
Re:Pre-auth RCE in Nginx HTTP/2 handling by tptacek on Wednesday November 18, 2026 @12:04PM (#50548818)
This is the thing about `unsafe` blocks: they're not memory safe. It's right there in the name.
Re:Pre-auth RCE in Nginx HTTP/2 handling by vlovich123 on Thursday November 19, 2026 @12:01AM (#50556247)
Android had an integer overflow vulnerability where it could be tricked into verifying the signing of one file but install another for execution. Boeing 787 Dreamliner had a bug where after 248 it's 32-bit counter overflowed triggering a "fail-safe" mode that shut down all electrical power to the aircraft.

You're right it's more rare but the results can still be catastrophic.

Re:Pre-auth RCE in Nginx HTTP/2 handling by AnthonyMouse on Wednesday November 18, 2026 @02:21PM (#50550781)
Isn't "memory corruption" typically the fast path to RCE? The attacker gets to overwrite a function pointer, or a regular pointer that then lets them overwrite something else, or the length field that will then cause a buffer overrun even in a "safe" language because the run-time length is now different than the one in the compile-time check, etc.
Re:Pre-auth RCE in Nginx HTTP/2 handling by tptacek on Wednesday November 18, 2026 @04:06PM (#50552114)
Memory corruption -> RCE.

Integer handling mistake -> memory corruption -> RCE.

That's the pattern. In a memory-safe language, the integer handling error has no link to memory corruption (though it will to other logic bugs!).

Re:Pre-auth RCE in Nginx HTTP/2 handling by 10000truths on Wednesday November 18, 2026 @12:10PM (#50548920)
Zig traps arithmetic overflow/underflow when compiling in ReleaseSafe.
Re:Pre-auth RCE in Nginx HTTP/2 handling by BoingBoomTschak on Wednesday November 18, 2026 @12:49PM (#50549546)
Lisp or Python have a proper numeric tower and don't default to machine types. Keyword being default, fast is still possible in CL.
Re:Pre-auth RCE in Nginx HTTP/2 handling by benlivengood on Wednesday November 18, 2026 @01:29PM (#50550098)
X86 had the INTO instruction to trigger a fault if the Overflow flag is set, so not quite a per-instruction bit but more of a suffix. JO is also fairly straightforward for compilers to add on important arithmetic operations. We can probably blame C entirely for this; only in C23 are there intrinsics for overflow detection on arithmetic.
Re:Pre-auth RCE in Nginx HTTP/2 handling by codedokode on Wednesday November 18, 2026 @09:45PM (#50555431)
C23 intrinsics are so ugly that nobody is going to use them. They should have made ordinary "+" to trap on overflow, and an ugly instirnsic to wrap around.