Re: [PATCH] wireless: fix 64K kernel heap content leak via ioctl
From: Luis R. Rodriguez
Date: Fri Aug 27 2010 - 18:52:14 EST
On Fri, Aug 27, 2010 at 3:39 PM, Jean Tourrilhes <jt@xxxxxxxxxx> wrote:
> On Fri, Aug 27, 2010 at 03:35:19PM -0700, Luis R. Rodriguez wrote:
>> >
>> > diff -u -p wext.j2.c wext.c
>> > --- wext.j2.c  2010-08-27 14:17:26.000000000 -0700
>> > +++ wext.c   Â2010-08-27 14:19:33.000000000 -0700
>> > @@ -800,9 +800,12 @@ static int ioctl_standard_iw_point(struc
>> > Â Â Â Â Â Â Â Â Â Â Â Âgoto out;
>> > Â Â Â Â Â Â Â Â}
>> >
>> > - Â Â Â Â Â Â Â if (copy_to_user(iwp->pointer, extra,
>> > - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âiwp->length *
>> > - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âdescr->token_size)) {
>> > + Â Â Â Â Â Â Â /* Verify how much we should return. Some driver
>> > + Â Â Â Â Â Â Â Â* may abuse iwp->length... */
>> > + Â Â Â Â Â Â Â if((iwp->length * descr->token_size) < extra_size)
>> > + Â Â Â Â Â Â Â Â Â Â Â extra_size = iwp->length * descr->token_size;
>> > +
>> > + Â Â Â Â Â Â Â if (copy_to_user(iwp->pointer, extra, extra_size)) {
>> > Â Â Â Â Â Â Â Â Â Â Â Âerr = -EFAULT;
>> > Â Â Â Â Â Â Â Â Â Â Â Âgoto out;
>> > Â Â Â Â Â Â Â Â}
>>
>>
>> Jean, can you submit in a new thread and right before the SOB add in
>> the commit log Cc: stable@xxxxxxxxxx [2.6.32+]
>
> Â Â Â ÂThe current patch was made for 2.6.27 and was only
> compiled. Someone would need to verify it works for 2.6.32. I could
> probably find some time next week.
Got it, ah so it would be Cc: stable@xxxxxxxxxx [2.6.27+]. To get this
trickled in we first need it for wireless-testing.git, and provide
links / patches to the backport of the patch for each kernel. Once it
gets merged into Linus' tree the stable team can apply the respective
backported patches.
Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/