]> git.baikalelectronics.ru Git - kernel.git/commit
drm: stop information leak of old kernel stack.
authorDave Airlie <airlied@redhat.com>
Tue, 17 Aug 2010 04:46:00 +0000 (14:46 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 17 Aug 2010 04:51:45 +0000 (14:51 +1000)
commitf17873517a4183d01e7dec8ff12da84f195d8f5a
tree3328b6503f7852868f642263dfa8a3decc487a1e
parent92b813bd5fd238dab50d7e2c2a8c6f9286eba6a6
drm: stop information leak of old kernel stack.

non-critical issue, CVE-2010-2803

Userspace controls the amount of memory to be allocate, so it can
get the ioctl to allocate more memory than the kernel uses, and get
access to kernel stack. This can only be done for processes authenticated
to the X server for DRI access, and if the user has DRI access.

Fix is to just memset the data to 0 if the user doesn't copy into
it in the first place.

Reported-by: Kees Cook <kees@ubuntu.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_drv.c