All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Aloni <dan@kernelim.com>
To: Sasha Levin <sasha.levin@oracle.com>
Cc: Dave Jones <davej@redhat.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: mm/sched/net: BUG when running simple code
Date: Tue, 17 Jun 2014 07:30:14 +0300	[thread overview]
Message-ID: <20140617043014.GA18161@gmail.com> (raw)
In-Reply-To: <539FB363.1070302@oracle.com>

On Mon, Jun 16, 2014 at 11:17:55PM -0400, Sasha Levin wrote:
> On 06/13/2014 12:13 AM, Dave Jones wrote:
> > On Fri, Jun 13, 2014 at 12:01:37AM -0400, Sasha Levin wrote:
> > another theory: Trinity can sometimes generate plausible looking module
> > addresses and pass those in structs etc.
> > 
> > I wonder if there's somewhere in that path that isn't checking that the address
> > in the optval it got is actually a userspace address before it tries to write to it.
> 
> It happened again, and this time I've left the kernel addresses in, and it's quite
> interesting:
> 
> [   88.837926] Call Trace:
> [   88.837926]  [<ffffffff9ff6a792>] __sock_create+0x292/0x3c0
> [   88.837926]  [<ffffffff9ff6a610>] ? __sock_create+0x110/0x3c0
> [   88.837926]  [<ffffffff9ff6a920>] sock_create+0x30/0x40
> [   88.837926]  [<ffffffff9ff6ad4c>] SyS_socket+0x2c/0x70
> [   88.837926]  [<ffffffffa0561c30>] ? tracesys+0x7e/0xe6
> [   88.837926]  [<ffffffffa0561c93>] tracesys+0xe1/0xe6
> 
> tracesys() seems to live inside a module space here?

I think it's more likely kASLR. The Documentation/x86/x86_64/mm.txt doc needs updating.

-- 
Dan Aloni

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Dan Aloni <dan@kernelim.com>
To: Sasha Levin <sasha.levin@oracle.com>
Cc: Dave Jones <davej@redhat.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: mm/sched/net: BUG when running simple code
Date: Tue, 17 Jun 2014 07:30:14 +0300	[thread overview]
Message-ID: <20140617043014.GA18161@gmail.com> (raw)
In-Reply-To: <539FB363.1070302@oracle.com>

On Mon, Jun 16, 2014 at 11:17:55PM -0400, Sasha Levin wrote:
> On 06/13/2014 12:13 AM, Dave Jones wrote:
> > On Fri, Jun 13, 2014 at 12:01:37AM -0400, Sasha Levin wrote:
> > another theory: Trinity can sometimes generate plausible looking module
> > addresses and pass those in structs etc.
> > 
> > I wonder if there's somewhere in that path that isn't checking that the address
> > in the optval it got is actually a userspace address before it tries to write to it.
> 
> It happened again, and this time I've left the kernel addresses in, and it's quite
> interesting:
> 
> [   88.837926] Call Trace:
> [   88.837926]  [<ffffffff9ff6a792>] __sock_create+0x292/0x3c0
> [   88.837926]  [<ffffffff9ff6a610>] ? __sock_create+0x110/0x3c0
> [   88.837926]  [<ffffffff9ff6a920>] sock_create+0x30/0x40
> [   88.837926]  [<ffffffff9ff6ad4c>] SyS_socket+0x2c/0x70
> [   88.837926]  [<ffffffffa0561c30>] ? tracesys+0x7e/0xe6
> [   88.837926]  [<ffffffffa0561c93>] tracesys+0xe1/0xe6
> 
> tracesys() seems to live inside a module space here?

I think it's more likely kASLR. The Documentation/x86/x86_64/mm.txt doc needs updating.

-- 
Dan Aloni

  reply	other threads:[~2014-06-17  4:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-13  2:56 mm/sched/net: BUG when running simple code Sasha Levin
2014-06-13  2:56 ` Sasha Levin
2014-06-13  3:27 ` Dan Aloni
2014-06-13  3:27   ` Dan Aloni
2014-06-13  4:01   ` Sasha Levin
2014-06-13  4:01     ` Sasha Levin
2014-06-13  4:13     ` Dave Jones
2014-06-13  4:13       ` Dave Jones
2014-06-13 15:13       ` Sasha Levin
2014-06-13 15:13         ` Sasha Levin
2014-06-17  3:17       ` Sasha Levin
2014-06-17  3:17         ` Sasha Levin
2014-06-17  4:30         ` Dan Aloni [this message]
2014-06-17  4:30           ` Dan Aloni
2014-06-13  4:55     ` Dan Aloni
2014-06-13  4:55       ` Dan Aloni
2014-06-13  5:26       ` Dan Aloni
2014-06-13  5:26         ` Dan Aloni
2014-06-13  5:31       ` Dan Aloni
2014-06-13  5:31         ` Dan Aloni
2014-07-08 14:51 ` Peter Zijlstra
2014-07-08 15:25   ` Sasha Levin
2014-07-08 15:25     ` Sasha Levin

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=20140617043014.GA18161@gmail.com \
    --to=dan@kernelim.com \
    --cc=akpm@linux-foundation.org \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=sasha.levin@oracle.com \
    /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.