]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Prevent overwriting from userspace underallocating core ioctl structs
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 16 Oct 2013 10:22:44 +0000 (11:22 +0100)
committerDave Airlie <airlied@redhat.com>
Fri, 18 Oct 2013 06:40:37 +0000 (07:40 +0100)
commitfcbfb2c8809fc1fa0d891b31106ffd56effbaaf5
tree6a07fbd3e3a7e63d8770772d8ba9f64eff66f206
parente5fc209d5ef2d1a2ba166b1108e67ec473e8794f
drm: Prevent overwriting from userspace underallocating core ioctl structs

Apply the protections from

commit 7205ccaf517f8de45fc0fdf43004e6f7b49b4ce1
Author: Dave Airlie <airlied@redhat.com>
Date:   Sat Aug 14 20:20:34 2010 +1000

    drm: block userspace under allocating buffer and having drivers overwrite it (v2)

to the core ioctl structs as well, for we found one instance where there
is a 32-/64-bit size mismatch and were guilty of writing beyond the end
of the user's buffer.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dave Airlie <airlied@redhat.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: dri-devel@lists.freedesktop.org
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_drv.c