[patch 15/17] drm/i915: fix ioremap of a user address for non-root (CVE-2008-3831)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Greg KH
Date: Saturday, October 18, 2008 - 11:34 am

2.6.27-stable review patch.  If anyone has any objections, please let us
know.

------------------
From: Matthias Hopf <mhopf@suse.de>

commit 4b40893918203ee1a1f6a114316c2a19c072e9bd upstream

Olaf Kirch noticed that the i915_set_status_page() function of the i915
kernel driver calls ioremap with an address offset that is supplied by
userspace via ioctl. The function zeroes the mapped memory via memset
and tells the hardware about the address. Turns out that access to that
ioctl is not restricted to root so users could probably exploit that to
do nasty things. We haven't tried to write actual exploit code though.

It only affects the Intel G33 series and newer.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/gpu/drm/i915/i915_dma.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -836,7 +836,7 @@ struct drm_ioctl_desc i915_ioctls[] = {
 	DRM_IOCTL_DEF(DRM_I915_SET_VBLANK_PIPE,  i915_vblank_pipe_set, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY ),
 	DRM_IOCTL_DEF(DRM_I915_GET_VBLANK_PIPE,  i915_vblank_pipe_get, DRM_AUTH ),
 	DRM_IOCTL_DEF(DRM_I915_VBLANK_SWAP, i915_vblank_swap, DRM_AUTH),
-	DRM_IOCTL_DEF(DRM_I915_HWS_ADDR, i915_set_status_page, DRM_AUTH),
+	DRM_IOCTL_DEF(DRM_I915_HWS_ADDR, i915_set_status_page, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
 };
 
 int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls);

-- 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 00/17] 2.6.27-stable review, Greg KH, (Sat Oct 18, 11:33 am)
[patch 14/17] usb: musb_hdrc build fixes, Greg KH, (Sat Oct 18, 11:34 am)
[patch 15/17] drm/i915: fix ioremap of a user address for ..., Greg KH, (Sat Oct 18, 11:34 am)
Re: [patch 00/17] 2.6.27-stable review, Greg KH, (Sat Oct 18, 11:36 am)
Re: [patch 00/17] 2.6.27-stable review, Josh Boyer, (Wed Oct 22, 6:01 pm)
Re: [stable] [patch 00/17] 2.6.27-stable review, Greg KH, (Wed Oct 22, 9:53 pm)
Re: [patch 00/17] 2.6.27-stable review, Willy Tarreau, (Wed Oct 22, 10:06 pm)
Re: [stable] [patch 00/17] 2.6.27-stable review, Josh Boyer, (Thu Oct 23, 3:33 am)
Re: [stable] [patch 00/17] 2.6.27-stable review, Greg KH, (Thu Oct 23, 8:33 am)
Re: [stable] [patch 00/17] 2.6.27-stable review, Josh Boyer, (Thu Oct 23, 8:47 am)
Re: [stable] [patch 00/17] 2.6.27-stable review, Greg KH, (Thu Oct 23, 8:51 am)