Skip to content

[5.1] Compatibility50: Backport objc_getClass hook patch. #27037

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

jckarter
Copy link
Contributor

@jckarter jckarter commented Sep 5, 2019

Explanation: Applies the security fix from #27015 for rdar://problem/54724618 so that binaries built to deploy back to Swift 5.0 are not vulnerable to malformed class names getting passed into objc_getClass. This is a toolchain fix that does not requiring updating the runtime in the OS.

Scope: Possible security hole if untrusted strings can be fed to NSClassFromString on Swift 5.0 runtimes

Issue: rdar://problem/55036306

Risk: Low

Testing: Swift CI, locally tested on macOS 10.15 beta and 10.14.6

Reviewed by: @mikeash

We don't want older runtimes trying to chase rogue symbolic references through objc_getClass
either. rdar://problem/55036306
@jckarter jckarter requested a review from a team as a code owner September 5, 2019 18:32
@jckarter
Copy link
Contributor Author

jckarter commented Sep 5, 2019

@swift-ci Please test

@jckarter
Copy link
Contributor Author

jckarter commented Sep 5, 2019

@swift-ci Please nominate

@swift-ci
Copy link
Contributor

swift-ci commented Sep 5, 2019

Build failed
Swift Test OS X Platform
Git Sha - aac9b64

@jckarter
Copy link
Contributor Author

jckarter commented Sep 6, 2019

@swift-ci Please test OS X

@najacque najacque merged commit 3203e2a into swiftlang:swift-5.1-branch-08-28-2019 Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants