mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
Passing an object_count of sufficient size will make
object_count * 4 wrap around to be very small, then a later function
will happily iterate off the end of the object_ids array. Using
array_size() will saturate at SIZE_MAX, the kmalloc() will fail and
we'll return an -ENOMEM to the norty userspace.
Fixes: 62884cd386 ("drm: Add four ioctls for managing drm mode object leases [v7]")
Signed-off-by: Matthew Wilcox <[email protected]>
Acked-by: Kees Cook <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Cc: <[email protected]> # v4.15+
Signed-off-by: Dave Airlie <[email protected]>