HID: Bluetooth: hidp: make sure input buffers are big enough
HID core expects the input buffers to be at least of size 4096 (HID_MAX_BUFFER_SIZE). Other sizes will result in buffer-overflows if an input-report is smaller than advertised. We could, like i2c, compute the biggest report-size instead of using HID_MAX_BUFFER_SIZE, but this will blow up if report-descriptors are changed after ->start() has been called. So lets be safe and just use the biggest buffer we have. Note that this adds an additional copy to the HIDP input path. If there is a way to make sure the skb-buf is big enough, we should use that instead. The best way would be to make hid-core honor the @size argument, though, that sounds easier than it is. So lets just fix the buffer-overflows for now and afterwards look for a faster way for all transport drivers. Signed-off-by:David Herrmann <dh.herrmann@gmail.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
Loading
-
mentioned in commit 7827df0f
-
mentioned in commit 9a92bda6
-
mentioned in commit adba817f
-
mentioned in commit 6171c703
-
mentioned in commit 5626aa2b
-
mentioned in commit 0734e935
-
mentioned in commit cb08cc23
-
mentioned in commit 58bfceb0
-
mentioned in commit 1241e6c7
-
mentioned in commit 3154b3f0
-
mentioned in commit 8a67b428
Please sign in to comment