Re:Cap'n'Proto remote vuln: pointer overflow check optimized...
by banachtarski on Friday April 21, 2017 @03:31PM
(#14168631)
edit: oh gosh I totally misread something
> Since farPointer.offset is an unsigned number, the compiler is able to conclude that target < segmentStart always evaluates false. Thus, the compiler removes this part of the check. Unfortunately, in the case of overflow, this is exactly the part of the check that we need.
> Since farPointer.offset is an unsigned number, the compiler is able to conclude that target < segmentStart always evaluates false. Thus, the compiler removes this part of the check. Unfortunately, in the case of overflow, this is exactly the part of the check that we need.
This certainly seems like a compiler bug!