summaryrefslogtreecommitdiff
path: root/rust/helpers/workqueue.c
diff options
context:
space:
mode:
authorSamasth Norway Ananda <samasth.norway.ananda@oracle.com>2025-09-09 15:51:11 -0700
committerMark Brown <broonie@kernel.org>2025-09-18 22:26:31 +0100
commitce2335cd14b6585d57dc05a4375a506079adba81 (patch)
tree9970815d2790b9ef9c959804b5d540b31758b069 /rust/helpers/workqueue.c
parent32bd60d5eca048fb91eed723799c0b4a847c18e4 (diff)
ASoC: SOF: ipc3-dtrace: fix potential integer overflow in allocation
Fix a potential integer overflow vulnerability in trace_filter_parse() where the allocation size calculation could overflow. The issue occurs when: 1. capacity is calculated by adding TRACE_FILTER_ELEMENTS_PER_ENTRY in a loop for each entry found in the input string. 2. capacity * sizeof(**out) multiplication could overflow if many entries are present in the input. 3. This results in a smaller allocation than expected, leading to potential buffer overflow. Replace kmalloc() with kmalloc_array() which provides built-in overflow checking and will safely fail the allocation if overflow would occur, preventing memory corruption. Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com> Link: https://patch.msgid.link/20250909225111.3740029-1-samasth.norway.ananda@oracle.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'rust/helpers/workqueue.c')
0 files changed, 0 insertions, 0 deletions