3 ms·
Funny thing. I just thought it was yet another memory leak, that could be avoided by higher level code handling dangerous network data. But if all the lessons
by marcosdumay 11y ago
Funny thing. I just thought it was yet another memory leak, that could be avoided by higher level code handling dangerous network data.
But if all the lessons the author took are that secure code should be lower level than this, well... I can not agree with it.
- makomk 11y agoHigher-level code is just an abstraction layer over the lower-level workings, and if that abstraction layer doesn't clear memory properly there may be no way to fix that without bypassing it altogether.
- twic 11y agoIf the abstraction layer doesn't let you read memory that's left over from some previous use, then it doesn't matter (for this vulnerability) if it clears it or not.
- kuschku 11y agoExcept, it does. Remember RowHammer? https://github.com/IAIK/rowhammerjs https://github.com/IAIK/rowhammerjs
- twic 11y agoRowhammer is a great demonstration that the memory abstraction in almost all languages does let you statistically modify the memory of other processes on appropriate hardware! I don't think rowhammer lets you read memory, though; does it? There are certainly some cache timing attacks that do, though.
- kuschku 11y agoI’m not sure, but it’s a great demonstration that, just because the abstraction limits direct access, it can not limit indirect access.
- marcosdumay 11y agoOk, work hard to clear secretive data from memory after using it... Just be sure to sanitize that code that manages untrusted inputs first (and by all means, make sure those two are different) because: - Your input parser can compromise many more things than what you'll think about erasing. - You won't be able to clean all secretive data anyway. You can't win here. - You can be sure to a huge degree that your input parsing code won't get outside of its bounds.