diff options
| author | Yousef Alhouseen <alhouseenyousef@gmail.com> | 2026-06-29 18:06:05 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-07-17 15:49:56 +0200 |
| commit | f66c40cd90954f52809b3eabd386137f56bb6215 (patch) | |
| tree | 3f6501270a6a2ee8d889378f663ca08b6c6eb804 /tools/perf/scripts/python | |
| parent | 808e530654a5354e6df78863a5d61e4d44e67235 (diff) | |
misc: bcm-vk: validate write size before allocation
bcm_vk_write() uses the user-supplied write count to size a
flexible-array work entry and then copies count bytes into that array.
The allocation expression is evaluated before any overflow check, so a
very large count can wrap the allocation smaller than the subsequent
copy.
Reject empty writes, check the allocation arithmetic before kzalloc(),
and initialize the __counted_by field before copying into to_v_msg[].
Signed-off-by: Yousef Alhouseen <alhouseenyousef@gmail.com>
Link: https://patch.msgid.link/20260629160605.29412-1-alhouseenyousef@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
