News for hackers. Stuff that matters.
Re:Linux kernel heap buffer overflow in fs_context.c since v... by AceJohnny2 on Thursday January 20, 2022 @11:27PM (#30019156)
> First, unsigned integer underflow and overflow is _not_ UB. It is very well defined operation (wrap-around arithmetic) and the bug in question is not the result of undefined behavior

Shockingly true. Per the C Standard, "6.2.5 Types" paragraph 9:

A computation involving unsigned operands can never overflow, because a result that cannot be represented by the resulting unsigned integer type is reduced modulo the number that is one greater than the largest value that can be represented by the resulting type.

There are no comments on this comment yet.