4 ms·
NSArchiver aside, how is obj-c insecure?
by azinman2 3y ago
NSArchiver aside, how is obj-c insecure?
- saagarjha 3y agoMany more instances of undefined behavior
- azinman2 3y agoSuch as?
- catiopatio 3y agoDynamic dispatch with heavy reliance on runtime metadata is a huge attack surface in terms of being able to leverage a data bug into full control of execution. Additionally, the language provides very few runtime or static compile-time guarantees relative to Swift. This disparity grows even larger if one leverages C directly — which is both common and often necessary when writing ObjC code.
- azinman2 3y agoCan you give an example exploit that goes from a data bug to full control given dynamic dispatch? Less runtime / static guarantees may mean you pass the wrong class type to a method, but typically all that happens is that that object cannot perform the right selector. I can sort of see this being slightly chained to get some mild exploit, but I’d imagine this is pretty edge condition / rare as it would need to respond to the expected selector in the right way useful for exploit. I’ve written a ton of obj-c and work in it, and almost never need or see the use of C.
- pjmlp 3y agoThe C part of Objective-C.