Re: [PATCH v3] comedi: integer overflow in do_insnlist_ioctl()

Dan Carpenter
2011-11-27T11:25:57Z

[-- Attachment #1: Type: text/plain, Size: 946 bytes --]

On Sat, Nov 26, 2011 at 06:52:52PM -0800, Greg KH wrote:
> On Fri, Nov 25, 2011 at 04:46:51PM -0500, Xi Wang wrote:
> > There is a potential integer overflow in do_insnlist_ioctl() if
> > userspace passes in a large insnlist.n_insns. The call to kmalloc()
> > would allocate a small buffer, leading to a memory corruption.
> >
> > The bug was reported by Dan Carpenter <dan.carpenter@oracle.com>
> > and Haogang Chen <haogangchen@gmail.com>. The patch was suggested by
> > Ian Abbott <abbotti@mev.co.uk> and Lars-Peter Clausen <lars@metafoo.de>.
> >
> > Signed-off-by: Xi Wang <xi.wang@gmail.com>
>
> Hm, I already applied Dan's previous patch, what should I do with this
> one now? Revert Dan's and apply this one, or apply both of them, or
> something else?

Sorry for that, I should have replied to my patch when I learned that
it had a problem.

Please, revert mine and apply Xi Wang's.

regards,
dan carpenter

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]