]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
HID: debug: check length before copy_to_user()
authorDaniel Rosenberg <drosen@google.com>
Mon, 2 Jul 2018 23:59:37 +0000 (16:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Jul 2018 14:03:50 +0000 (16:03 +0200)
commitef111ea31575bdc50c0c914fe036a1d0ad0cae4e
treeedccf20c35d984d7d7546189ac8e19c5a1198388
parentc0b166a64eef92a410a50f71b12b1b63cc5f32db
HID: debug: check length before copy_to_user()

commit 717adfdaf14704fd3ec7fa2c04520c0723247eac upstream.

If our length is greater than the size of the buffer, we
overflow the buffer

Cc: stable@vger.kernel.org
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/hid-debug.c