Re: [PATCH] wmi: Fix kernel panic when stack protection enabled.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 09 Jun 2009 20:46:24 Carlos Corbacho wrote:
> [Adding Len to CC]
>
> On Tuesday 09 Jun 2009 22:09:23 lcostantino@xxxxxxxxx wrote:
> > From: Costantino Leandro <lcostantino@xxxxxxxxx>
> >
> > Summary:
> > Kernel panic arise when stack protection is enabled, since strncat will
> > add a null terminating byte '\0'; So in functions
> > like this one (wmi_query_block):
> >         char wc[4]="WC";
> > 	....
> > 	strncat(method, block->object_id, 2);
> >         ...
> > the length of wc should be n+1 (wc[5]) or stack protection
> > fault will arise. This is not noticeable when stack protection is
> > disabled,but , isn't good either.
> > Config used: [CONFIG_CC_STACKPROTECTOR_ALL=y,
> > 	      CONFIG_CC_STACKPROTECTOR=y]
> >
> > Panic Trace
> > ------------
> >        .... stack-protector: kernel stack corrupted in : fa7b182c
> >        2.6.30-rc8-obelisco-generic
> >        call_trace:
> >            [<c04a6c40>] ? panic+0x45/0xd9
> > 	   [<c012925d>] ? __stack_chk_fail+0x1c/0x40
> > 	   [<fa7b182c>] ? wmi_query_block+0x15a/0x162 [wmi]
> > 	   [<fa7b182c>] ? wmi_query_block+0x15a/0x162 [wmi]
> > 	   [<fa7e7000>] ? acer_wmi_init+0x00/0x61a [acer_wmi]
> > 	   [<fa7e7135>] ? acer_wmi_init+0x135/0x61a [acer_wmi]
> > 	   [<c0101159>] ? do_one_initcall+0x50+0x126
> >
> > Signed-off-by: Costantino Leandro <lcostantino@xxxxxxxxx>
>
> Acked-by: Carlos Corbacho <carlos@xxxxxxxxxxxxxxxxxxx>

Cc: stable@xxxxxxxxxx

Since I'm starting to get quite a few bug reports from people about 2.6.30 
when distributions are turning on stack protector.

-Carlos
-- 
E-Mail: carlos@xxxxxxxxxxxxxxxxxxx
Web: strangeworlds.co.uk
GPG Key ID: 0x23EE722D
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux