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

Fixing potential overflow in array read in string to float cast #1591

Conversation

hyperbolic2346
Copy link
Collaborator

String to float cast would read into undefined memory if there were >= 19 digits in the string. This ultimately wasn't an issue in our test because the number of digits read to that point was 0, so the math was (0 * undef) + .... Fixing it by creating a constant where the outer code can read it as well to ensure that it is large enough to handle the values.

Fixes #1574

@hyperbolic2346 hyperbolic2346 added the bug Something isn't working label Nov 22, 2023
@hyperbolic2346 hyperbolic2346 self-assigned this Nov 22, 2023
@hyperbolic2346
Copy link
Collaborator Author

build

Copy link
Collaborator

@ttnghia ttnghia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure to run comupter-sanitizer on the test.

@hyperbolic2346 hyperbolic2346 merged commit 9858813 into NVIDIA:branch-23.12 Nov 28, 2023
3 checks passed
@hyperbolic2346 hyperbolic2346 deleted the mwilson/string-to-float-invalid-read branch November 28, 2023 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Invalid memory access bug in string_to_float_kernel
2 participants