Re: [PATCH 2/3] HID: logitech-{dj,hidpp}: check report length

2014-12-19 Thread Jiri Kosina
On Tue, 16 Dec 2014, Benjamin Tissoires wrote: > This is my personal opinion and Jiri can say something different. I > tend not to send big patches while there is a window opened. Sometimes > Jiri has the time to get through them, sometime he does not. > In this case, I think the patches you sent

Re: [PATCH 2/3] HID: logitech-{dj,hidpp}: check report length

2014-12-16 Thread Benjamin Tissoires
On Tue, Dec 16, 2014 at 10:20 AM, Peter Wu wrote: > On Tuesday 16 December 2014 09:53:07 Benjamin Tissoires wrote: >> On Mon, Dec 15, 2014 at 7:50 PM, Peter Wu wrote: >> > Malicious USB devices can send bogus reports smaller than the expected >> > buffer size. Ensure that the length is valid to a

Re: [PATCH 2/3] HID: logitech-{dj,hidpp}: check report length

2014-12-16 Thread Peter Wu
On Tuesday 16 December 2014 09:53:07 Benjamin Tissoires wrote: > On Mon, Dec 15, 2014 at 7:50 PM, Peter Wu wrote: > > Malicious USB devices can send bogus reports smaller than the expected > > buffer size. Ensure that the length is valid to avoid reading out of > > bounds. > > > > For the old WTP,

Re: [PATCH 2/3] HID: logitech-{dj,hidpp}: check report length

2014-12-16 Thread Benjamin Tissoires
Hi Peter, On Mon, Dec 15, 2014 at 7:50 PM, Peter Wu wrote: > Malicious USB devices can send bogus reports smaller than the expected > buffer size. Ensure that the length is valid to avoid reading out of > bounds. > > For the old WTP, I do not have a HID descriptor so just check for the > minimum

[PATCH 2/3] HID: logitech-{dj,hidpp}: check report length

2014-12-15 Thread Peter Wu
Malicious USB devices can send bogus reports smaller than the expected buffer size. Ensure that the length is valid to avoid reading out of bounds. For the old WTP, I do not have a HID descriptor so just check for the minimum length in hidpp_raw_event (this can be changed to an inequality later).