Re: [PATCH] cdc-acm: prevent infinite loop when parsing CDC headers.

2015-04-14 Thread Sergei Shtylyov
Hello. On 4/13/2015 7:20 PM, Sergei Shtylyov wrote: Phil and I found out a problem with commit: 7e860a6e ("cdc-acm: add sanity checks") It added some sanity checks to ignore potential garbage in CDC headers but also introduced a potential infinite loop. This can happen at the first lo

Re: [PATCH] cdc-acm: prevent infinite loop when parsing CDC headers.

2015-04-13 Thread Sergei Shtylyov
Hello. On 04/13/2015 06:24 PM, Quentin Casasnovas wrote: Phil and I found out a problem with commit: 7e860a6e ("cdc-acm: add sanity checks") It added some sanity checks to ignore potential garbage in CDC headers but also introduced a potential infinite loop. This can happen at the fir

Re: [PATCH] cdc-acm: prevent infinite loop when parsing CDC headers.

2015-04-13 Thread Quentin Casasnovas
On Mon, Apr 13, 2015 at 11:48:27PM +0800, Adam Lee wrote: > On Mon, Apr 13, 2015 at 05:24:04PM +0200, Quentin Casasnovas wrote: > > Phil and I found out a problem with commit: > > > > 7e860a6e ("cdc-acm: add sanity checks") > > > > It added some sanity checks to ignore potential garbage in CDC

Re: [PATCH] cdc-acm: prevent infinite loop when parsing CDC headers.

2015-04-13 Thread Quentin Casasnovas
Adding Greg on CC as suggested by Oliver. On Mon, Apr 13, 2015 at 05:24:04PM +0200, Quentin Casasnovas wrote: > Phil and I found out a problem with commit: > > 7e860a6e ("cdc-acm: add sanity checks") > > It added some sanity checks to ignore potential garbage in CDC headers but > also introduc

Re: [PATCH] cdc-acm: prevent infinite loop when parsing CDC headers.

2015-04-13 Thread Adam Lee
On Mon, Apr 13, 2015 at 05:24:04PM +0200, Quentin Casasnovas wrote: > Phil and I found out a problem with commit: > > 7e860a6e ("cdc-acm: add sanity checks") > > It added some sanity checks to ignore potential garbage in CDC headers but > also introduced a potential infinite loop. This can hap

[PATCH] cdc-acm: prevent infinite loop when parsing CDC headers.

2015-04-13 Thread Quentin Casasnovas
Phil and I found out a problem with commit: 7e860a6e ("cdc-acm: add sanity checks") It added some sanity checks to ignore potential garbage in CDC headers but also introduced a potential infinite loop. This can happen at the first loop iteration (elength = 0 in that case) if the description is