vm audit: add VM_DONTEXPAND to mmap for drivers that need it (CVE-2008-0007)
authorNick Piggin <npiggin@suse.de>
Sat, 2 Feb 2008 02:08:53 +0000 (03:08 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 8 Feb 2008 20:01:45 +0000 (12:01 -0800)
commitd4dd8e3a7287146e479c77e0456eaa315875972a
tree60af474e387a51cada420be207f4a13b96c83edd
parent5f8d005f5ee726ec8b6b3ddd9920a3e609740320
vm audit: add VM_DONTEXPAND to mmap for drivers that need it (CVE-2008-0007)

Drivers that register a ->fault handler, but do not range-check the
offset argument, must set VM_DONTEXPAND in the vm_flags in order to
prevent an expanding mremap from overflowing the resource.

I've audited the tree and attempted to fix these problems (usually by
adding VM_DONTEXPAND where it is not obvious).

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/char/drm/drm_vm.c
drivers/char/mspec.c
fs/ncpfs/mmap.c
kernel/relay.c
mm/mmap.c
sound/oss/via82cxxx_audio.c
sound/usb/usx2y/usX2Yhwdep.c
sound/usb/usx2y/usx2yhwdeppcm.c