From: Carlos Corbacho <carlos@strangeworlds.co.uk>
To: "lcostantino@gmail.com" <lcostantino@gmail.com>
Cc: linux-acpi@vger.kernel.org, Len Brown <lenb@kernel.org>
Subject: Re: [PATCH] wmi: Fix kernel panic when stack protection enabled.
Date: Fri, 12 Jun 2009 06:44:18 +0100 [thread overview]
Message-ID: <200906120644.19252.carlos@strangeworlds.co.uk> (raw)
In-Reply-To: <200906092046.24983.carlos@strangeworlds.co.uk>
On Tuesday 09 Jun 2009 20:46:24 Carlos Corbacho wrote:
> [Adding Len to CC]
>
> On Tuesday 09 Jun 2009 22:09:23 lcostantino@gmail.com wrote:
> > From: Costantino Leandro <lcostantino@gmail.com>
> >
> > 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@gmail.com>
>
> Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: stable@kernel.org
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@strangeworlds.co.uk
Web: strangeworlds.co.uk
GPG Key ID: 0x23EE722D
next prev parent reply other threads:[~2009-06-12 5:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-09 21:09 [PATCH] wmi: Fix kernel panic when stack protection enabled lcostantino
2009-06-09 19:46 ` Carlos Corbacho
2009-06-12 5:44 ` Carlos Corbacho [this message]
2009-06-18 21:52 ` Carlos Corbacho
2009-06-24 17:54 Carlos Corbacho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200906120644.19252.carlos@strangeworlds.co.uk \
--to=carlos@strangeworlds.co.uk \
--cc=lcostantino@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.