News for hackers. Stuff that matters.
Re:Everything in C is undefined behavior by pjc50 on Wednesday May 20, 2026 @03:39AM (#48204398)
UB based on input can be an exploit vector.
Re:Everything in C is undefined behavior by layer8 on Wednesday May 20, 2026 @03:53AM (#48204491)
Unvalidated input can always be an exploit vector.
Re:Everything in C is undefined behavior by Ygg2 on Wednesday May 20, 2026 @03:58AM (#48204516)
Except in C, validation of user input can in itself be an exploit vector.
Re:Everything in C is undefined behavior by greybeard69 on Wednesday May 20, 2026 @04:04AM (#48204566)
Turtles all the way down.
Re:Everything in C is undefined behavior by layer8 on Wednesday May 20, 2026 @04:24AM (#48204692)
That’s true in other languages as well. Any programmatic task can end up being an exploit vector.
Re:Everything in C is undefined behavior by pjc50 on Wednesday May 20, 2026 @04:52AM (#48204874)
No? That's the whole point of formal verification?

You can even kind of retrofit this to C. The classic example is "sel4". You just need a set of proofs that the code doesn't trigger UB. This ends up being much larger and more complicated than the C itself.

Re:Everything in C is undefined behavior by rocketrascal on Wednesday May 20, 2026 @07:34AM (#48206091)
You can fail to verify something which you actually wanted to verify (i.e you made a proof of something else instead of the thing that mattered). See WPA2 KRACK as an example.
Re:Everything in C is undefined behavior by Ygg2 on Wednesday May 20, 2026 @11:11AM (#48209120)
Yeah, but only in C* can those errors end up as more UB.

* terms and limits may apply.

Re:Everything in C is undefined behavior by eru on Thursday May 21, 2026 @08:29PM (#48230486)
Many other languages also have UB. But almost none is as trigger happy as C and C++ are.