First published: Thu Aug 05 2010(Updated: )
Description of problem: There is a problem with the ioctl subsystem for drm, though it is most explicitly exposed by the intel GEM driver. Under driver-defined ioctls, drm does not sanitize the ioctl command, allowing the caller to specify how much memory should be kmalloc'd and copied back to the caller, regardless of what the driver ioctl actually does (it doesn't even need to succeed). drivers/gpu/drm/drm_drv.c long drm_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) ... unsigned int nr = DRM_IOCTL_NR(cmd); ... if ((nr >= DRM_COMMAND_BASE) && (nr < DRM_COMMAND_END) && (nr < DRM_COMMAND_BASE + dev->driver->num_ioctls)) ioctl = &dev->driver->ioctls[nr - DRM_COMMAND_BASE]; ... if (cmd & (IOC_IN | IOC_OUT)) { if (_IOC_SIZE(cmd) <= sizeof(stack_kdata)) { kdata = stack_kdata; } else { kdata = kmalloc(_IOC_SIZE(cmd), GFP_KERNEL); ... } } ... retcode = func(dev, kdata, file_priv); ... if (cmd & IOC_OUT) { if (copy_to_user((void __user *)arg, kdata, _IOC_SIZE(cmd)) != 0) retcode = -EFAULT; } "cmd" is caller-controlled, and can do whatever it likes for _IOC_SIZE(cmd), IOC_IN and IOC_OUT, resulting in leakage of previously freed kernel heap memory contents up to 16K in size.
Credit: secalert@redhat.com
Affected Software | Affected Version | How to fix |
---|---|---|
debian/linux-2.6 | ||
Linux Kernel | <2.6.27.53 | |
Linux Kernel | >=2.6.32<2.6.32.21 | |
Linux Kernel | >=2.6.34<2.6.34.6 | |
Linux Kernel | >=2.6.35<2.6.35.4 | |
Debian GNU/Linux | =5.0 | |
openSUSE | =11.1 | |
openSUSE | =11.3 | |
SUSE Linux Enterprise Desktop with Beagle | =11-sp1 | |
SUSE Linux Enterprise High Availability | =11-sp1 | |
SUSE Linux Enterprise Real Time Extension | =11-sp1 | |
SUSE Linux Enterprise Server | =11-sp1 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
The severity of CVE-2010-2803 is considered to be high due to the potential for local privilege escalation.
To fix CVE-2010-2803, you should update your Linux kernel to a version beyond the vulnerable 2.6.32 or apply relevant patches.
CVE-2010-2803 affects various Linux distributions including Debian, openSUSE, and SUSE Linux Enterprise Server versions prior to their respective patched releases.
CVE-2010-2803 describes a vulnerability in the ioctl subsystem for drm that allows drivers to process unsanitized ioctl commands, leading to memory allocation issues.
CVE-2010-2803 remains a threat for users who are running vulnerable versions of the Linux kernel that have not been patched.