From: toddpoynor@google.com (Todd Poynor)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: backtrace: avoid crash on large invalid fp value
Date: Tue, 9 Oct 2012 23:46:12 -0700 [thread overview]
Message-ID: <1349851572-9967-1-git-send-email-toddpoynor@google.com> (raw)
Invalid frame pointer (signed) -4 <= fp <= -1 defeats check for too high
on overflow.
Signed-off-by: Todd Poynor <toddpoynor@google.com>
---
arch/arm/kernel/stacktrace.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/kernel/stacktrace.c b/arch/arm/kernel/stacktrace.c
index 00f79e5..6315162 100644
--- a/arch/arm/kernel/stacktrace.c
+++ b/arch/arm/kernel/stacktrace.c
@@ -31,7 +31,7 @@ int notrace unwind_frame(struct stackframe *frame)
high = ALIGN(low, THREAD_SIZE);
/* check current frame pointer is within bounds */
- if (fp < (low + 12) || fp + 4 >= high)
+ if (fp < (low + 12) || fp >= high - 4)
return -EINVAL;
/* restore the registers from the stack frame */
--
1.7.7.3
next reply other threads:[~2012-10-10 6:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-10 6:46 Todd Poynor [this message]
2012-10-10 11:15 ` [PATCH] ARM: backtrace: avoid crash on large invalid fp value Dave Martin
2012-11-02 23:47 ` Colin Cross
2012-11-05 10:54 ` Dave Martin
2012-11-09 2:05 ` Colin Cross
2012-11-09 10:56 ` Dave Martin
2012-11-09 18:17 ` Colin Cross
2012-11-13 9:49 ` Dave Martin
-- strict thread matches above, loose matches on Subject: below --
2012-05-08 7:49 Todd Poynor
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=1349851572-9967-1-git-send-email-toddpoynor@google.com \
--to=toddpoynor@google.com \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).