CVE-2010-2803: Infoleak
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/drmdrv.c
long drmioctl(struct file filp, unsigned int cmd, unsigned long arg) ... unsigned int nr = DRMIOCTLNR(cmd); ... if ((nr >= DRMCOMMANDBASE) && (nr < DRMCOMMANDEND) && (nr < DRMCOMMANDBASE + dev->driver->numioctls)) ioctl = &dev->driver->ioctls[nr - DRMCOMMANDBASE]; ... if (cmd & (IOCIN | IOCOUT)) { if (IOCSIZE(cmd) <= sizeof(stackkdata)) { kdata = stackkdata; } else { kdata = kmalloc(IOCSIZE(cmd), GFPKERNEL); ... } } ... retcode = func(dev, kdata, filepriv); ... if (cmd & IOCOUT) { if (copytouser((void user )arg, kdata, IOCSIZE(cmd)) != 0) retcode = -EFAULT; }
"cmd" is caller-controlled, and can do whatever it likes for IOCSIZE(cmd), IOCIN and IOCOUT, resulting in leakage of previously freed kernel heap memory contents up to 16K in size.
Other sources
The drmioctl function in drivers/gpu/drm/drmdrv.c in the Direct Rendering Manager (DRM) subsystem in the Linux kernel before 2.6.27.53, 2.6.32.x before 2.6.32.21, 2.6.34.x before 2.6.34.6, and 2.6.35.x before 2.6.35.4 allows local users to obtain potentially sensitive information from kernel memory by requesting a large memory-allocation amount.
— Launchpad
Affected Software
Remediation
Patch Available
Event History
Frequently Asked Questions
What is the severity of CVE-2010-2803?
The severity of CVE-2010-2803 is considered to be high due to the potential for local privilege escalation.
How do I fix CVE-2010-2803?
To fix CVE-2010-2803, you should update your Linux kernel to a version beyond the vulnerable 2.6.32 or apply relevant patches.
Which Linux distributions are affected by CVE-2010-2803?
CVE-2010-2803 affects various Linux distributions including Debian, openSUSE, and SUSE Linux Enterprise Server versions prior to their respective patched releases.
What is the main issue described by CVE-2010-2803?
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.
Is CVE-2010-2803 still a threat?
CVE-2010-2803 remains a threat for users who are running vulnerable versions of the Linux kernel that have not been patched.