From: Petr Holasek <pholasek@redhat.com>
To: Hugh Dickins <hughd@google.com>
Cc: Sasha Levin <sasha.levin@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: mm, ksm: NULL ptr deref in unstable_tree_search_insert
Date: Wed, 19 Dec 2012 13:16:48 +0100 [thread overview]
Message-ID: <20121219121647.GB4381@thinkpad-work.redhat.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1212181728400.1091@eggly.anvils>
On Tue, 18 Dec 2012, Hugh Dickins wrote:
> On Tue, 18 Dec 2012, Sasha Levin wrote:
>
> > Hi all,
> >
> > While fuzzing with trinity inside a KVM tools guest, running latest linux-next kernel, I've
> > stumbled on the following:
> >
> > [ 127.959264] BUG: unable to handle kernel NULL pointer dereference at 0000000000000110
> > [ 127.960379] IP: [<ffffffff81185b60>] __lock_acquire+0xb0/0xa90
...
> > 88 e9 b9 09 00 00 90 <48> 81 3b 60 59 22 86 b8 01 00 00 00 44 0f 44 e8 41 83 fc 01 77
> > [ 127.978032] RIP [<ffffffff81185b60>] __lock_acquire+0xb0/0xa90
> > [ 127.978032] RSP <ffff8800137abb78>
> > [ 127.978032] CR2: 0000000000000110
> > [ 127.978032] ---[ end trace 3dc1b0c5db8c1230 ]---
> >
> > The relevant piece of code is:
> >
> > static struct page *get_mergeable_page(struct rmap_item *rmap_item)
> > {
> > struct mm_struct *mm = rmap_item->mm;
> > unsigned long addr = rmap_item->address;
> > struct vm_area_struct *vma;
> > struct page *page;
> >
> > down_read(&mm->mmap_sem);
> >
> > Where 'mm' is NULL. I'm not really sure how it happens though.
>
> Thanks, yes, I got that, and it's not peculiar to fuzzing at all:
> I'm testing the fix at the moment, but just hit something else too
> (ksmd oops on NULL p->mm in task_numa_fault i.e. task_numa_placement).
>
> For the moment, you're safer not to run KSM: configure it out or don't
> set it to run. Fixes to follow later, I'll try to remember to Cc you.
>
Hello all,
I've also tried fuzzing with trinity inside of kvm guest when tested KSM
patch, but applied on top of 3.7-rc8, but didn't trigger that oops. So
going to do the same testing on linux-next.
Hugh, does it seem like bug in unstable_tree_search_insert() you mentioned
in yesterday email of something else?
Thank you for your testing && feedback!
Petr
--
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: Petr Holasek <pholasek@redhat.com>
To: Hugh Dickins <hughd@google.com>
Cc: Sasha Levin <sasha.levin@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: mm, ksm: NULL ptr deref in unstable_tree_search_insert
Date: Wed, 19 Dec 2012 13:16:48 +0100 [thread overview]
Message-ID: <20121219121647.GB4381@thinkpad-work.redhat.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1212181728400.1091@eggly.anvils>
On Tue, 18 Dec 2012, Hugh Dickins wrote:
> On Tue, 18 Dec 2012, Sasha Levin wrote:
>
> > Hi all,
> >
> > While fuzzing with trinity inside a KVM tools guest, running latest linux-next kernel, I've
> > stumbled on the following:
> >
> > [ 127.959264] BUG: unable to handle kernel NULL pointer dereference at 0000000000000110
> > [ 127.960379] IP: [<ffffffff81185b60>] __lock_acquire+0xb0/0xa90
...
> > 88 e9 b9 09 00 00 90 <48> 81 3b 60 59 22 86 b8 01 00 00 00 44 0f 44 e8 41 83 fc 01 77
> > [ 127.978032] RIP [<ffffffff81185b60>] __lock_acquire+0xb0/0xa90
> > [ 127.978032] RSP <ffff8800137abb78>
> > [ 127.978032] CR2: 0000000000000110
> > [ 127.978032] ---[ end trace 3dc1b0c5db8c1230 ]---
> >
> > The relevant piece of code is:
> >
> > static struct page *get_mergeable_page(struct rmap_item *rmap_item)
> > {
> > struct mm_struct *mm = rmap_item->mm;
> > unsigned long addr = rmap_item->address;
> > struct vm_area_struct *vma;
> > struct page *page;
> >
> > down_read(&mm->mmap_sem);
> >
> > Where 'mm' is NULL. I'm not really sure how it happens though.
>
> Thanks, yes, I got that, and it's not peculiar to fuzzing at all:
> I'm testing the fix at the moment, but just hit something else too
> (ksmd oops on NULL p->mm in task_numa_fault i.e. task_numa_placement).
>
> For the moment, you're safer not to run KSM: configure it out or don't
> set it to run. Fixes to follow later, I'll try to remember to Cc you.
>
Hello all,
I've also tried fuzzing with trinity inside of kvm guest when tested KSM
patch, but applied on top of 3.7-rc8, but didn't trigger that oops. So
going to do the same testing on linux-next.
Hugh, does it seem like bug in unstable_tree_search_insert() you mentioned
in yesterday email of something else?
Thank you for your testing && feedback!
Petr
next prev parent reply other threads:[~2012-12-19 12:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-19 1:17 mm, ksm: NULL ptr deref in unstable_tree_search_insert Sasha Levin
2012-12-19 1:17 ` Sasha Levin
2012-12-19 1:36 ` Hugh Dickins
2012-12-19 1:36 ` Hugh Dickins
2012-12-19 12:16 ` Petr Holasek [this message]
2012-12-19 12:16 ` Petr Holasek
2012-12-19 17:55 ` Hugh Dickins
2012-12-19 17:55 ` Hugh Dickins
2012-12-20 0:21 ` Hugh Dickins
2012-12-20 0:21 ` Hugh Dickins
2012-12-19 16:32 ` Petr Holasek
2012-12-19 16:32 ` Petr Holasek
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=20121219121647.GB4381@thinkpad-work.redhat.com \
--to=pholasek@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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.