staging: comedi: fix infoleak to userspace
commit8df2d5870c76436e31a68ee141636f6555f9c789
authorVasiliy Kulikov <segoon@openwall.com>
Sun, 26 Jun 2011 08:56:22 +0000 (26 12:56 +0400)
committerAndi Kleen <ak@linux.intel.com>
Mon, 1 Aug 2011 20:55:03 +0000 (1 13:55 -0700)
tree2111851d6f77637302d62256151dbfc119a6bf5b
parent1566cd03b690efb4d9997294cda9d0ac53ab3816
staging: comedi: fix infoleak to userspace

[ upstream commit 819cbb120eaec7e014e5abd029260db1ca8c5735 ]

driver_name and board_name are pointers to strings, not buffers of size
COMEDI_NAMELEN.  Copying COMEDI_NAMELEN bytes of a string containing
less than COMEDI_NAMELEN-1 bytes would leak some unrelated bytes.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
drivers/staging/comedi/comedi_fops.c