diff options
author | Dmitry Torokhov <dtor@chromium.org> | 2016-01-18 22:40:37 -0800 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2016-01-19 14:09:14 +0100 |
commit | 5137b354bc8a5c04edb10d83f8bdb0bf8896fd68 (patch) | |
tree | 0d807d72f283a043b5df07003c0e047311f13898 /drivers/hid/hid-debug.c | |
parent | c2848f2eef4dd08b0fd2a8eba1694fd8e77ddb67 (diff) |
HID: fix out of bound access in extract() and implement()
extract() and implement() access buffer containing reports in 64-bit
chunks, but there is no guarantee that buffers are padded to 64 bit
boundary. In fact, KASAN has caught such OOB access with i2c-hid and
Synaptics touch controller.
Instead of trying to hunt all parties that allocate buffers and make
sure they are padded, let's switch extract() and implement() to byte
access. It is a bit slower, bit we are not dealing with super fast
devices here.
Also let's fix link to the HID spec while we are at it.
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-debug.c')
0 files changed, 0 insertions, 0 deletions