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

Fix for heap buffer overflow in partition_kernel_impl() #538

Conversation

NB4444
Copy link
Contributor

@NB4444 NB4444 commented Mar 19, 2024

Added check to partition kernel to prevent read and write out-of-bounds. The number of indices is partitions+1, this are also the number of threads necessary. The writes and reads out-of-bounds have the same value as the last value in the indices array.

@stanleytsang-amd
Copy link
Collaborator

All tests pass. LGTM

@stanleytsang-amd stanleytsang-amd merged commit adca9af into ROCm:develop Mar 25, 2024
10 checks passed
@NB4444 NB4444 deleted the heap-buffer-overflow-fix-partition-kernel branch March 25, 2024 14:58
stanleytsang-amd pushed a commit to stanleytsang-amd/rocPRIM that referenced this pull request Apr 3, 2024
stanleytsang-amd added a commit that referenced this pull request Apr 18, 2024
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.

2 participants