Re:This shouldn't have happened: A vulnerability postmortem
by ummonk on Wednesday December 01, 2021 @06:46PM
(#29410639)
As far as I know, nothing in the C/C++ standard precludes fat pointers with bounds checking. Trying to access outside the bounds of an array is merely undefined behavior, so it would conform to the spec to simply throw an error in such situations.
[ Parent
| on HN ]
Re:This shouldn't have happened: A vulnerability postmortem
by gpderetta on Thursday December 02, 2021 @08:29AM
(#29415825)
There's address-sanitizer, although for ABI compatibility the bound is stored in shadow memory, not alongside the pointer. It is very expensive though. A C implementation with fat pointer would probably have significantly lower overhead, but breaking compatibility is a non-starter. And you still need to deal with use-after-free.