upvote
This fixes the integer underflow for CVE-2026-123007, and it's true that the underflow can happen in any language, notwithstanding whether it's UB or not. The issue is what happens as a consequence of this underflow, in this case: out of bounds copy, which is specific to C.
reply
Some languages make it significantly easier than C to just forbid integer overflow/underflow entirely.

Given that on modern CPUs, cycles are quite fast, and memory latency is quite high, always-checked integer operations sound like an extremely good idea.

reply
Sure, I usually use `overflow-checks = true` in Rust for this reason. However, it is still true that the overflow is not what caused the issue here. In Rust it would've paniced on the out of bounds copy, even with `overflow-checks = false`.
reply
It is not specific to C. You could have bounds checking also in C, and you can have non-checked indexing also in many other languages, including Rust. I would agree though that many other language make it harder to not have the bounds checking, but the bigger question is why this is not done C (and the answer that this is very hard to do is false).
reply