[PATCH 1/4] usb: config-desc.bLength may not exceed amount of data returned by the device

2013-08-03 Thread Hans de Goede
While reading the config parsing code I noticed this check is missing, without this check config-desc.wTotalLength can end up with a value larger then the dev-rawdescriptors length for the config, and when userspace then tries to get the rawdescriptors bad things may happen. Signed-off-by: Hans

[PATCH 1/4] usb: config-desc.bLength may not exceed amount of data returned by the device

2013-05-30 Thread Hans de Goede
While reading the config parsing code I noticed this check is missing, without this check config-desc.wTotalLength can end up with a value larger then the dev-rawdescriptors length for the config, and when userspace then tries to get the rawdescriptors bad things may happen. Signed-off-by: Hans

Re: [PATCH 1/4] usb: config-desc.bLength may not exceed amount of data returned by the device

2013-05-30 Thread Alan Stern
On Thu, 30 May 2013, Hans de Goede wrote: While reading the config parsing code I noticed this check is missing, without this check config-desc.wTotalLength can end up with a value larger then the dev-rawdescriptors length for the config, and when userspace then tries to get the

Re: [PATCH 1/4] usb: config-desc.bLength may not exceed amount of data returned by the device

2013-05-30 Thread Hans de Goede
Hi, On 05/30/2013 04:51 PM, Alan Stern wrote: On Thu, 30 May 2013, Hans de Goede wrote: While reading the config parsing code I noticed this check is missing, without this check config-desc.wTotalLength can end up with a value larger then the dev-rawdescriptors length for the config, and when

Re: [PATCH 1/4] usb: config-desc.bLength may not exceed amount of data returned by the device

2013-05-30 Thread Alan Stern
On Thu, 30 May 2013, Hans de Goede wrote: Hi, On 05/30/2013 04:51 PM, Alan Stern wrote: On Thu, 30 May 2013, Hans de Goede wrote: While reading the config parsing code I noticed this check is missing, without this check config-desc.wTotalLength can end up with a value larger then