Skip to content
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

Validate real and expected type of arguments to cwise ops. #54028

Merged
merged 1 commit into from
Jan 26, 2022
Merged

Validate real and expected type of arguments to cwise ops. #54028

merged 1 commit into from
Jan 26, 2022

Conversation

pranve
Copy link

@pranve pranve commented Jan 25, 2022

Without this validation, it is possible to trigger a CHECK-fail denial of service.

This is a rollforward of a previous commit which was rolled back as it was relying on RTTI. This time we don't use RTTI, we replace typeid(Tin).name() with a double function call, DataTypeString(DataTypeToEnum<Tin>::v()).

PiperOrigin-RevId: 409340416
Change-Id: I96080b2796729a3a9b65e7c68307ac276070f2f0

Without this validation, it is possible to trigger a `CHECK`-fail denial of service.

This is a rollforward of a previous commit which was rolled back as it was relying on RTTI. This time we don't use RTTI, we replace `typeid(Tin).name()` with a double function call, `DataTypeString(DataTypeToEnum<Tin>::v())`.

PiperOrigin-RevId: 409340416
Change-Id: I96080b2796729a3a9b65e7c68307ac276070f2f0
@mihaimaruseac mihaimaruseac merged commit b804cbf into tensorflow:r2.5 Jan 26, 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.

None yet

2 participants