Skip to content

[WebNN] Validate slice strides are within input tensor dimensions#59611

Merged
chromium-wpt-export-bot merged 1 commit intomasterfrom
chromium-export-cl-7801676
May 2, 2026
Merged

[WebNN] Validate slice strides are within input tensor dimensions#59611
chromium-wpt-export-bot merged 1 commit intomasterfrom
chromium-export-cl-7801676

Conversation

@chromium-wpt-export-bot
Copy link
Copy Markdown
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented May 1, 2026

Add validation in ValidateSliceAndInferOutput to ensure that the stride
for each dimension, when added to the starting index, does not exceed
the input tensor's dimension size. This prevents out-of-bounds memory
access when a stride is too large relative to the starting position.

Bug: 505136164
Change-Id: Ib1575a942084d974cf358f0b2baa1d8e42a8295a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7801676
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Hu, Ningxin <ningxin.hu@intel.com>
Commit-Queue: Wang, Wei4 <wei4.wang@intel.com>
Cr-Commit-Position: refs/heads/main@{#1624222}

Add validation in ValidateSliceAndInferOutput to ensure that the stride
for each dimension, when added to the starting index, does not exceed
the input tensor's dimension size. This prevents out-of-bounds memory
access when a stride is too large relative to the starting position.

Bug: 505136164
Change-Id: Ib1575a942084d974cf358f0b2baa1d8e42a8295a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7801676
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Hu, Ningxin <ningxin.hu@intel.com>
Commit-Queue: Wang, Wei4 <wei4.wang@intel.com>
Cr-Commit-Position: refs/heads/main@{#1624222}
Copy link
Copy Markdown
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

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

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit c55f172 into master May 2, 2026
21 checks passed
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-7801676 branch May 2, 2026 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants