Re: [patch] module: static checker complains about negative values

2014-05-20 Thread Dan Carpenter
On Tue, May 20, 2014 at 11:16:04AM +0930, Rusty Russell wrote: > Dan Carpenter writes: > > > We cap "stat.size" at INT_MAX but we don't check for negative values so > > my static checker complains. At this point, you already have control of > > the kernel and if you start passing negative values

Re: [patch] module: static checker complains about negative values

2014-05-19 Thread Rusty Russell
Dan Carpenter writes: > We cap "stat.size" at INT_MAX but we don't check for negative values so > my static checker complains. At this point, you already have control of > the kernel and if you start passing negative values here then you > deserve what happens next. > > On 64 bit systems the vma

[patch] module: static checker complains about negative values

2014-05-19 Thread Dan Carpenter
We cap "stat.size" at INT_MAX but we don't check for negative values so my static checker complains. At this point, you already have control of the kernel and if you start passing negative values here then you deserve what happens next. On 64 bit systems the vmalloc() will definitely fail. On 32