diff options
| author | Feng Ning <feng@innora.ai> | 2026-04-12 00:05:08 +0000 |
|---|---|---|
| committer | Sakari Ailus <sakari.ailus@linux.intel.com> | 2026-05-20 13:21:40 +0300 |
| commit | d178c7ca8fefc28115d35b94c3b1f4d653e34182 (patch) | |
| tree | 31b2857aa4f9dc663ed5af2e2d6d0933e0df1881 /tools/perf/scripts/python | |
| parent | 7222dc8751e0c1a179acd6f8a2c664a7f16081b1 (diff) | |
staging: media: atomisp: use array3_size() for overflow-safe allocation
Replace open-coded width * height * sizeof() multiplications with
array3_size() to prevent integer overflow in buffer allocations.
The atomisp driver computes DVS, morphing table, shading table and
statistics buffer sizes using unchecked arithmetic. When dimensions
are attacker-controlled or simply large, the product can silently wrap,
causing kvmalloc() to allocate an undersized buffer.
array3_size() saturates to SIZE_MAX on overflow, so kvmalloc() returns
NULL instead of succeeding with too few bytes.
Signed-off-by: Feng Ning <feng@innora.ai>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
