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>
Wed, 6 Feb 2008 19:43:46 +0000 (11:43 -0800)
commit83af8eda68a3f0c227d0eb05348e58ae27a62e7e
tree33ce1f20faa9337c5c08f39dd840c34dc311e041
parent0abe2d30fd090eba86541654080fee7686cf72fc
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