Skip to content

[Security] Fix integer overflow in slice-nd reshape strides - #11132

Open
roopd3v wants to merge 1 commit into
google:masterfrom
roopd3v:fix/slice-nd-stride-overflow
Open

[Security] Fix integer overflow in slice-nd reshape strides#11132
roopd3v wants to merge 1 commit into
google:masterfrom
roopd3v:fix/slice-nd-stride-overflow

Conversation

@roopd3v

@roopd3v roopd3v commented Sep 3, 2026

Copy link
Copy Markdown

reshape_slice_nd() builds input/output strides with unguarded size_t multiplies. On overflow the stored strides wrap, so setup can advance the input pointer past a buffer sized from the wrapping product of the same dims.

This applies xnn_safe_mul() and returns xnn_status_invalid_parameter on overflow, matching the depth-to-space hardening in PR #10990.

Reported privately via Google OSS VRP; opening this PR at the program's request so the merged-patch acceptance criterion can be met.

@google-cla

google-cla Bot commented Sep 3, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@roopd3v
roopd3v force-pushed the fix/slice-nd-stride-overflow branch from 4e1a642 to aa64c5a Compare September 3, 2026 21:42
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