Bugzilla – Bug 49118
VUL-0: CVE-2004-0075: kernel: Vicam USB driver
Last modified: 2021-10-13 13:39:33 UTC
Alan mentioned it at the botom of another mail. (It triggers a crash/kernel oops) Date: Fri, 09 Jan 2004 00:52:05 +0000 From: Alan Cox <alan@lxorguk.ukuu.org.uk> To: vendor-sec@lst.de, akpm@osdl.org Subject: [vendor-sec] Direct render infrastructure: multiple apparent vulnerabilities The DRI code contains lots of gems like static int r128_cce_dispatch_write_span( drm_device_t *dev, drm_r128_depth_t *depth ) { drm_r128_private_t *dev_priv = dev->dev_private; int count, x, y; u32 *buffer; u8 *mask; int i; RING_LOCALS; DRM_DEBUG( "%s\n", __FUNCTION__ ); count = depth->n; if ( copy_from_user( &x, depth->x, sizeof(x) ) ) { return -EFAULT; } if ( copy_from_user( &y, depth->y, sizeof(y) ) ) { return -EFAULT; } buffer = kmalloc( depth->n * sizeof(u32), GFP_KERNEL ); Which has at least 3 bugs in it 1. depth is already kernel space 2. depth->n is never checked 3. depth->n * 4 tends to be a small number if you pick the right n, and it then copies into it. Its not the only example at all so folks may wish to audit their DRI code extensively. I've not looked at the non Linux paths. In the XFree 4.4 devel tree the sis memory allocator for the non sisfb paths is also not robust and at the very least I can oops it. Eric Anholt knows about this one and will look at it. The radeon mem code looks similar to the SIS but I've not attacked that. Only the sis memory allocator in XFree 4.4 rc is public knowledge. See also however a seperate linux-kernel posting suggesting bugs in the gamma driver about user/kernel copying, and also in vt.c Alan
<!-- SBZ_reproduce --> -
CAN-2004-0075
Created attachment 15741 [details] vicam-2.4.25pre.diff
Sorry, I mixed it up. vt.c != vicam.c Forget #1. I meant vicam for sure.
Fixed.
<!-- SBZ_reopen -->Reopened by thomas@suse.de at Mon Feb 16 11:39:12 2004
reopen, reassigned for tracking.
2.4.18 is not vulnerable.
2.4.20 (8.2) is fixed too.
packages released.
CVE-2004-0075: CVSS v2 Base Score: 2.1 (AV:L/AC:L/Au:N/C:N/I:N/A:P)