Skip to content

[Reflection] Range-check shapeIndex in createBoundGenericTypeReconstructingParent. #62535

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

Merged
merged 1 commit into from
Dec 13, 2022

Conversation

mikeash
Copy link
Contributor

@mikeash mikeash commented Dec 12, 2022

If the parentNode chain ends up being longer than genericParamsPerLevel, we can underflow shapeIndex, resulting in an out-of-bounds read. Range check it against the vector before trying to read it, and return NULL if it's out of bounds.

rdar://103220412

…uctingParent.

If the parentNode chain ends up being longer than genericParamsPerLevel, we can underflow shapeIndex, resulting in an out-of-bounds read. Range check it against the vector before trying to read it, and return NULL if it's out of bounds.

rdar://103220412
@mikeash
Copy link
Contributor Author

mikeash commented Dec 12, 2022

@swift-ci please test and merge

@mikeash
Copy link
Contributor Author

mikeash commented Dec 13, 2022

@swift-ci please smoke test macos platform

@mikeash mikeash merged commit b93834f into swiftlang:main Dec 13, 2022
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.

1 participant