18 ms·
I just realized you might be thinking of security in the sense of keys/partial keys. Things that matter: * vtable and code pointers: leaks the aslr slide * d
by olliej 8y ago
I just realized you might be thinking of security in the sense of keys/partial keys.
Things that matter:
* vtable and code pointers: leaks the aslr slide
* data pointers: leak heap location
* type ids: can be used to spoof objects
* length and size fields: can give you information about heap layout
Etc etc.
All of these get attacked.
- saagarjha 8y agoThe standard (and compilers that conform to it) have no sense of security baked into them. They don't know that they should wipe certain buffers because as far as it's concerned the C "abstract virtual machine" provides no way of accessing such data. Of course, as a real software engineer you know that you will make mistakes and these will frequently allow implementation details to leak in ways that are exploitable; however, there is no standards-compliant way to protect against this because as far as it is concerned you always write correct code. There are ways to influence the compiler to do certain things that help in the case of mistakes (memset_s, __attribute__((packed))) but these do not and cannot solve the underlying problem because they are by definition non-portable: they change things that are implementation-defined and not standards-defined.