News for hackers. Stuff that matters.
Re:Cap'n'Proto remote vuln: pointer overflow check optimized... by cperciva on Friday April 21, 2017 @04:37AM (#14163934)
There's a link at the bottom of the article to "A technically-correct solution has been implemented in the next commit".

Also, I'd be very interested in hearing a suggestion as to how this should be implemented

I don't know enough about the problem space to say for certain, but in general I'd say that "work with unsigned integers and convert them to pointers only after performing all necessary sanitization" is good advice.

Re:Cap'n'Proto remote vuln: pointer overflow check optimized... by unwind on Friday April 21, 2017 @04:47AM (#14163968)
Ah, thanks! Didn't see that. That's some hairy code, for sure. :|

I don't even know if these things are the same in C and C++ any more (the code in question is in C++).

/me runs back to C.

Re:Cap'n'Proto remote vuln: pointer overflow check optimized... by cperciva on Friday April 21, 2017 @05:08AM (#14164053)
I wondered about that, so I checked the latest C++ standard. What it says about uintptr_t is basically "this should do what it does in C".