Skip to content

Copybara import of the project: - #11082

Merged
copybara-service[bot] merged 2 commits into
masterfrom
test_971399026
Sep 1, 2026
Merged

Copybara import of the project:#11082
copybara-service[bot] merged 2 commits into
masterfrom
test_971399026

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Copybara import of the project:

--
4013867 by destro4evr-rgb destro4evr@proton.me:

litert/xnnpack: add rank guards to Conv/Pool ToXnnpack() before shape subscripts

AveragePool2D, MaxPool2D, Conv2D, DepthwiseConv2D, and TransposeConv2D
all access fixed shape indices (shape[0]..shape[3]) on input, filter, and
output tensors without first checking that the shape vector is large enough.
A crafted TFLite model with a wrong-rank tensor triggers a null pointer
dereference during XNNPACK subgraph compilation at model load time.

Add rank size checks before the first shape subscript access in each
function, following the pattern already present in
TransposeConvOperation::ToXnnpack() (lines 1649-1653).
FUTURE_COPYBARA_INTEGRATE_REVIEW=#11057 from destro4evr-rgb:fix/litert-conv-pool-missing-rank-checks 4013867

… subscripts

AveragePool2D, MaxPool2D, Conv2D, DepthwiseConv2D, and TransposeConv2D
all access fixed shape indices (shape[0]..shape[3]) on input, filter, and
output tensors without first checking that the shape vector is large enough.
A crafted TFLite model with a wrong-rank tensor triggers a null pointer
dereference during XNNPACK subgraph compilation at model load time.

Add rank size checks before the first shape subscript access in each
function, following the pattern already present in
TransposeConvOperation::ToXnnpack() (lines 1649-1653).
…ssing-rank-checks

PiperOrigin-RevId: 974682030
@copybara-service
copybara-service Bot merged commit 8c02ee3 into master Sep 1, 2026
26 of 27 checks passed
@copybara-service
copybara-service Bot deleted the test_971399026 branch September 1, 2026 20:44
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