-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[macOS] support secure restorable state by default #151605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
8a367e9 to
7c434ac
Compare
By default, Flutter apps only do default AppKit app serialisation of Window location etc. and by default, state serialisation in AppKit apps is compatible with NSSecureCoding. AppKit apps generated since Xcode 13.2 include this method in the app delegate generated by the default app template. Background ========== This method was added to opt into having [de]serialization require a coder implementing the `NSSecureCoding` protocol. Apple wasn't able to force this across the board, because `NSSecureCoding` limits certain behaviours during deserialisation, which some third-party apps have have previously relied on. Specific background on the sorts of vulnerabilities that `NSSecureCoding` was designed to prevent are described in the `NSSecureCoding` documentation: https://developer.apple.com/documentation/foundation/nssecurecoding?language=objc A demonstration of a root privilege escalation and SIP bypass vulnerability is described in the following blog post: https://sector7.computest.nl/post/2022-08-process-injection-breaking-all-macos-security-layers-with-a-single-vulnerability/ Issue: flutter#150062
Avoid leading developers down the rabbit-hole of whether or not they need to change the override value to false.
packages/flutter_tools/lib/src/macos/migrations/secure_restorable_state_migration.dart
Show resolved
Hide resolved
loic-sharma
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
2b0a3fb to
3f93813
Compare
2ce2cf9 to
45e68cb
Compare
|
auto label is removed for flutter/flutter/151605, due to - The status or check suite Mac tool_integration_tests_1_4 has failed. Please fix the issues identified (or deflake) before re-applying this label. |
|
auto label is removed for flutter/flutter/151605, due to - The status or check suite Mac_arm64 build_tests_1_4 has failed. Please fix the issues identified (or deflake) before re-applying this label. |
By default, Flutter apps only do default AppKit app serialisation of Window location etc. and by default, state serialisation in AppKit apps is compatible with
NSSecureCoding. AppKit apps generated since Xcode 13.2 include this method in the app delegate generated by the default app template.Background
This method was added to opt into having [de]serialization require a coder implementing the
NSSecureCodingprotocol. Apple wasn't able to force this across the board, becauseNSSecureCodinglimits certain behaviours during deserialisation, which some third-party apps have have previously relied on.Specific background on the sorts of vulnerabilities that
NSSecureCodingwas designed to prevent are described in theNSSecureCodingdocumentation:https://developer.apple.com/documentation/foundation/nssecurecoding?language=objc
A demonstration of a root privilege escalation and SIP bypass vulnerability is described in the following blog post: https://sector7.computest.nl/post/2022-08-process-injection-breaking-all-macos-security-layers-with-a-single-vulnerability/
Fixes: #150062
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.