From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: Subject: Patch "mm: fix NULL ptr deref when walking hugepages" has been added to the 3.4-stable tree To: levinsasha928@gmail.com,aarcange@redhat.com,akpm@linux-foundation.org,andi@firstfloor.org,gregkh@linuxfoundation.org,kamezawa.hiroyu@jp.fujitsu.com,kosaki.motohiro@jp.fujitsu.com,n-horiguchi@ah.jp.nec.com,rientjes@google.com,torvalds@linux-foundation.org Cc: , From: Date: Fri, 01 Jun 2012 16:20:39 +0800 Message-ID: <1338538839320@kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ASCII Content-Transfer-Encoding: 8bit List-ID: This is a note to let you know that I've just added the patch titled mm: fix NULL ptr deref when walking hugepages to the 3.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mm-fix-null-ptr-deref-when-walking-hugepages.patch and it can be found in the queue-3.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 08fa29d916c6e271ad13978cd993e7238c68db97 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Tue, 29 May 2012 15:06:15 -0700 Subject: mm: fix NULL ptr deref when walking hugepages From: Sasha Levin commit 08fa29d916c6e271ad13978cd993e7238c68db97 upstream. A missing validation of the value returned by find_vma() could cause a NULL ptr dereference when walking the pagetable. This is triggerable from usermode by a simple user by trying to read a page info out of /proc/pid/pagemap which doesn't exist. Introduced by commit 025c5b2451e4 ("thp: optimize away unnecessary page table locking"). Signed-off-by: Sasha Levin Reviewed-by: Naoya Horiguchi Cc: David Rientjes Cc: Andi Kleen Cc: Andrea Arcangeli Cc: KOSAKI Motohiro Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- fs/proc/task_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -784,7 +784,7 @@ static int pagemap_pte_range(pmd_t *pmd, /* find the first VMA at or above 'addr' */ vma = find_vma(walk->mm, addr); - if (pmd_trans_huge_lock(pmd, vma) == 1) { + if (vma && pmd_trans_huge_lock(pmd, vma) == 1) { for (; addr != end; addr += PAGE_SIZE) { unsigned long offset; Patches currently in stable-queue which might be from levinsasha928@gmail.com are queue-3.4/mm-fix-null-ptr-deref-when-walking-hugepages.patch