summaryrefslogtreecommitdiff
path: root/sound/usb/usx2y/usX2Yhwdep.c
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2008-02-02 03:08:53 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2008-02-06 11:43:46 -0800
commit83af8eda68a3f0c227d0eb05348e58ae27a62e7e (patch)
tree33ce1f20faa9337c5c08f39dd840c34dc311e041 /sound/usb/usx2y/usX2Yhwdep.c
parent0abe2d30fd090eba86541654080fee7686cf72fc (diff)
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>
Diffstat (limited to 'sound/usb/usx2y/usX2Yhwdep.c')
-rw-r--r--sound/usb/usx2y/usX2Yhwdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/usx2y/usX2Yhwdep.c b/sound/usb/usx2y/usX2Yhwdep.c
index b76b3dd9df25..e617d7ec6478 100644
--- a/sound/usb/usx2y/usX2Yhwdep.c
+++ b/sound/usb/usx2y/usX2Yhwdep.c
@@ -88,7 +88,7 @@ static int snd_us428ctls_mmap(struct snd_hwdep * hw, struct file *filp, struct v
us428->us428ctls_sharedmem->CtlSnapShotLast = -2;
}
area->vm_ops = &us428ctls_vm_ops;
- area->vm_flags |= VM_RESERVED;
+ area->vm_flags |= VM_RESERVED | VM_DONTEXPAND;
area->vm_private_data = hw->private_data;
return 0;
}