Patch "mm: fix NULL ptr deref when walking hugepages" has been added to the 3.4-stable tree
Subsystems (3)
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 <[email protected]> know about it.
Quoted 1 line
From
08fa29d916c6e271ad13978cd993e7238c68db97Mon Sep 17 00:00:00 2001
From: Sasha Levin <[email protected]>
Date: Tue, 29 May 2012 15:06:15 -0700
Subject: mm: fix NULL ptr deref when walking hugepages
From: Sasha Levin <[email protected]>
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").
--- fs/proc/task_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/proc/task_mmu.c +1 -1
@@ -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 [email protected] are
queue-3.4/mm-fix-null-ptr-deref-when-walking-hugepages.patch