On Feb 18, 2018, at 10:30 , Markus Spoettl <ms_li...@shiftoption.com> wrote:
> 
> The decoder isn't terribly concerned with where the individual classes will 
> occur, just that they might.

I was going to reply that it’s stupid that it behaves like this, but I guess it 
makes some sense after all. The secure coding protection against class 
substitutions can be global like this, since class identities are global in the 
archive.

Still, you should probably assert “[notes isKindOf: [NSAttributedString 
class]]” immediately after that decode. Maybe I’m overthinking it, but I’d 
worry that your workaround enables some other kind of attack. For example, 
without the check, a maliciously-crafted archive that cause “notes” to be a 
NSTextTab could potentially crash your app, and that in turn might open up a 
vulnerability.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to