vm audit: add VM_DONTEXPAND to mmap for drivers that need it (CVE-2008-0007)
commitf5871b9016c0ebce8acc58f7a230adcb9bd89577
authorNick Piggin <npiggin@suse.de>
Sat, 2 Feb 2008 02:08:53 +0000 (2 03:08 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 8 Feb 2008 19:46:21 +0000 (8 11:46 -0800)
treeced41f583da6ac27c4c083d35f44dacb781fad36
parentf4ae0ab4b8237848ad5d687342a10cd3b7037705
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