CVE-2025-54952: Executorch Unchecked Size Mul Sizeof In Allocate

Allocator call receives an unchecked `$N * sizeof($T)` byte count. If `$N` is large (e.g., attacker-controlled, derived from a model/file field), the multiplication can wrap `size_t` and the allocator will return an under-sized buffer while the caller still indexes up to `$N` elements, causing a heap buffer overflow (CWE-680, CVE-2025-54952). Guard the multi

Provally CuratedPublic repositoryHighHigh confidenceVerifiedApache-2.0C++
greprules fetch cve-2025-54952-executorch-unchecked-size-mul-sizeof-in-allocate --engine opengrep

Description

Allocator call receives an unchecked `$N * sizeof($T)` byte count. If `$N` is large (e.g., attacker-controlled, derived from a model/file field), the multiplication can wrap `size_t` and the allocator will return an under-sized buffer while the caller still indexes up to `$N` elements, causing a heap buffer overflow (CWE-680, CVE-2025-54952). Guard the multi