All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Gloger <wg@malloc.de>
To: Kees Cook <kees@outflux.net>
Cc: dvyukov@google.com, ak@linux.intel.com,
	linux-kernel@vger.kernel.org, pjt@google.com,
	andreyknvl@google.com, kcc@google.com, x86@kernel.org
Subject: Re: Out-of-bounds access in get_wchan (arch/x86/kernel/process_64.c)
Date: Sat, 28 Sep 2013 21:51:14 +0200	[thread overview]
Message-ID: <u4zjqwg1xp.fsf@mail.malloc.de> (raw)
In-Reply-To: <20130927190312.GV21253@outflux.net> (message from Kees Cook on Fri, 27 Sep 2013 12:03:12 -0700)

Kees Cook <kees@outflux.net> writes:

> Please note that these bounds checks aren't correct to begin with. Since
> a pointer is being dereferenced, the end boundry must be reduced by
> sizeof(unsigned long) as well.
>
> It looks like process_32.c suffers the same problems, too.

I can't see the end boundary problem in process_32.c.  The end checks
are properly reduced with the top_esp and top_ebp macros.

All I can see in process_32.c is that the check

		if (bp < stack_page || bp > top_ebp+stack_page)

could be replaced by:

		if (bp < stack_page-sizeof(unsigned long) || bp > top_ebp+stack_page)

but that is a relaxation and not an over/underrun fix.

Can you elaborate what problem you see in process_32.c?

Regards,
Wolfram.

  reply	other threads:[~2013-09-28 19:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-03 14:41 Out-of-bounds access in get_wchan (arch/x86/kernel/process_64.c) Dmitry Vyukov
2013-09-10 22:06 ` Andi Kleen
2013-09-11 18:16   ` Dmitry Vyukov
2013-09-27 19:03     ` Kees Cook
2013-09-28 19:51       ` Wolfram Gloger [this message]
2013-09-28 21:01         ` Kees Cook

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=u4zjqwg1xp.fsf@mail.malloc.de \
    --to=wg@malloc.de \
    --cc=ak@linux.intel.com \
    --cc=andreyknvl@google.com \
    --cc=dvyukov@google.com \
    --cc=kcc@google.com \
    --cc=kees@outflux.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pjt@google.com \
    --cc=x86@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.