From: Xi Wang Date: Fri, 25 Nov 2011 21:46:51 +0000 (-0500) Subject: Staging: comedi: fix integer overflow in do_insnlist_ioctl() X-Git-Tag: v3.2-rc5~51^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfd8ee92a9192d78aa38cf8699df3630a7c88c85;p=pandora-kernel.git Staging: comedi: fix integer overflow in do_insnlist_ioctl() There is a potential integer overflow in do_insnlist_ioctl() if userspace passes in a large insnlist.n_insns. The call to kmalloc() would allocate a small buffer, leading to a memory corruption. The bug was reported by Dan Carpenter and Haogang Chen . The patch was suggested by Ian Abbott and Lars-Peter Clausen . Reported-by: Dan Carpenter Reported-by: Haogang Chen . Cc: Ian Abbott Cc: Lars-Peter Clausen Signed-off-by: Xi Wang Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed