]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm: integer overflow in drm_mode_dirtyfb_ioctl()
authorXi Wang <xi.wang@gmail.com>
Wed, 23 Nov 2011 06:12:01 +0000 (01:12 -0500)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Fri, 17 Aug 2012 19:34:59 +0000 (15:34 -0400)
commit2d5bea3e719eb7dc957f168155337578acded206
treeb602c50d4efe37d04aee6aec0c058a7b7cbd5668
parent3d67f874fd94587baa38869d317d537242baa097
drm: integer overflow in drm_mode_dirtyfb_ioctl()

commit a5cd335165e31db9dbab636fd29895d41da55dd2 upstream.

There is a potential integer overflow in drm_mode_dirtyfb_ioctl()
if userspace passes in a large num_clips.  The call to kmalloc would
allocate a small buffer, and the call to fb->funcs->dirty may result
in a memory corruption.

Reported-by: Haogang Chen <haogangchen@gmail.com>
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
drivers/gpu/drm/drm_crtc.c
include/drm/drm_mode.h