diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2014-12-11 16:02:45 -0800 |
---|---|---|
committer | Luis Henriques <luis.henriques@canonical.com> | 2015-01-15 10:44:00 +0000 |
commit | 85ff89afa411fe9554e60801ed39ba35765f4466 (patch) | |
tree | f4b8f972903609c5d2c28c0df2377c717b88dd7f /net | |
parent | 9cc8ab9ef84f94f741cbac882057d36d2d19766e (diff) | |
download | linux-stable-85ff89afa411fe9554e60801ed39ba35765f4466.tar.gz linux-stable-85ff89afa411fe9554e60801ed39ba35765f4466.tar.bz2 linux-stable-85ff89afa411fe9554e60801ed39ba35765f4466.zip |
HID: i2c-hid: prevent buffer overflow in early IRQ
commit d1c7e29e8d276c669e8790bb8be9f505ddc48888 upstream.
Before ->start() is called, bufsize size is set to HID_MIN_BUFFER_SIZE,
64 bytes. While processing the IRQ, we were asking to receive up to
wMaxInputLength bytes, which can be bigger than 64 bytes.
Later, when ->start is run, a proper bufsize will be calculated.
Given wMaxInputLength is said to be unreliable in other part of the
code, set to receive only what we can even if it results in truncated
reports.
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions