Re: [PATCH v2] platform/chrome: cros_ec_dev - Fix security issue

2016-03-08 Thread Gwendal Grignou
On Sun, Mar 6, 2016 at 12:11 PM, Olof Johansson wrote: > Hi, > ... > > How about you introduce a reasonable max size for a transaction instead > (256K?), and compare data_size with that? Might want to check with the EC > folks > what they expect larges transactions to be from

Re: [PATCH v2] platform/chrome: cros_ec_dev - Fix security issue

2016-03-08 Thread Gwendal Grignou
On Sun, Mar 6, 2016 at 12:11 PM, Olof Johansson wrote: > Hi, > ... > > How about you introduce a reasonable max size for a transaction instead > (256K?), and compare data_size with that? Might want to check with the EC > folks > what they expect larges transactions to be from their side, and go

Re: [PATCH v2] platform/chrome: cros_ec_dev - Fix security issue

2016-03-06 Thread Olof Johansson
Hi, On Thu, Mar 03, 2016 at 11:00:13AM -0800, Gwendal Grignou wrote: > Add a check to prevent memory scribble when sending an ioctl with .insize > set so large that memory allocation argument overflows. > > Signed-off-by: Gwendal Grignou > --- >

Re: [PATCH v2] platform/chrome: cros_ec_dev - Fix security issue

2016-03-06 Thread Olof Johansson
Hi, On Thu, Mar 03, 2016 at 11:00:13AM -0800, Gwendal Grignou wrote: > Add a check to prevent memory scribble when sending an ioctl with .insize > set so large that memory allocation argument overflows. > > Signed-off-by: Gwendal Grignou > --- > drivers/platform/chrome/cros_ec_dev.c | 12