]> git.baikalelectronics.ru Git - kernel.git/commit
HID: fix HIDIOCGRDESC memory access in hidraw
authorJiri Kosina <jkosina@suse.cz>
Mon, 15 Oct 2007 13:17:41 +0000 (15:17 +0200)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 15 Oct 2007 15:12:00 +0000 (08:12 -0700)
commitc306f70a59b752e8707198d34a55226baa399e43
treed9594d10bfc843b44eb4ad1b32f945b000330f8c
parent410d308e43c1f6ba866d0b4ebd5e74f68e72bbc2
HID: fix HIDIOCGRDESC memory access in hidraw

Fix bogus copying of data into userspace when HIDIOCGRDESC is issued.
HID-transport layer makes sure that dev->hid->rdesc is not larger than
HID_MAX_DESCRIPTOR_SIZE.

Noticed-by: Al Viro <viro@ftp.linux.org.uk>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/hid/hidraw.c
include/linux/hid.h
include/linux/hidraw.h