aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorPaulo Zanoni <[email protected]>2023-06-26 14:22:20 -0700
committerRodrigo Vivi <[email protected]>2023-12-21 11:35:05 -0500
commit7f38e1e1063e1b9b2c8368c741ff5e679091e9f8 (patch)
tree9da788caaa1c2071a306c470c71e75906fea5f21 /tools/perf/scripts/python/export-to-sqlite.py
parentf07d9a615b7b257bf2c2197262769286ddc75109 (diff)
drm/xe: fix bounds checking for 'len' in xe_engine_create_ioctl
There's this shared machine running xe.ko and I often log in to see my tmux corrupted by messages such as: usercopy: Kernel memory overwrite attempt detected to wrapped address (offset 0, size 18446660151965198754)! I also sometimes see: kernel BUG at mm/usercopy.c:102! Someone is running a program that's definitely submitting random numbers to this ioctl. If you pass width=65535 and num_placements=32769 then you get a negative 'len', which avoids the EINVAL check, leading to the bug. Switch 'len' to u32. It is the result of the multiplication of two u16 numbers, so it won't be able to overflow back into smaller numbers as an u32. v2: Make len u32 instead of checking for <=0 (José). Signed-off-by: Paulo Zanoni <[email protected]> Reviewed-by: José Roberto de Souza <[email protected]> Reviewed-by: Matthew Brost <[email protected]> Reviewed-by: Lucas De Marchi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lucas De Marchi <[email protected]> Signed-off-by: Rodrigo Vivi <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions