linux-stable/mm
William Lee Irwin III 43cdfc5ea9 [PATCH] try_to_unmap_cluster() passes out-of-bounds pte to pte_unmap()
try_to_unmap_cluster() does:
        for (pte = pte_offset_map(pmd, address);
                        address < end; pte++, address += PAGE_SIZE) {
		...
	}

	pte_unmap(pte);

It may take a little staring to notice, but pte can actually fall off the
end of the pte page in this iteration, which makes life difficult for
kmap_atomic() and the users not expecting it to BUG().  Of course, we're
somewhat lucky in that arithmetic elsewhere in the function guarantees that
at least one iteration is made, lest this force larger rearrangements to be
made.  This issue and patch also apply to non-mm mainline and with trivial
adjustments, at least two related kernels.

Discovered during internal testing at Oracle.

Signed-off-by: William Irwin <wli@holomorphy.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@osdl.org>
2005-06-11 19:45:21 -07:00
..
Makefile 2.6.11 import 2005-05-12 09:59:06 -07:00
bootmem.c 2.6.11 import 2005-05-12 09:59:06 -07:00
fadvise.c 2.6.11 import 2005-05-12 09:59:06 -07:00
filemap.c 2.6.11 import 2005-05-12 09:59:06 -07:00
fremap.c 2.6.11 import 2005-05-12 09:59:06 -07:00
highmem.c 2.6.11 import 2005-05-12 09:59:06 -07:00
hugetlb.c 2.6.11 import 2005-05-12 09:59:06 -07:00
internal.h 2.6.11 import 2005-05-12 09:59:06 -07:00
madvise.c 2.6.11 import 2005-05-12 09:59:06 -07:00
memory.c 2.6.11 import 2005-05-12 09:59:06 -07:00
mempolicy.c 2.6.11 import 2005-05-12 09:59:06 -07:00
mempool.c 2.6.11 import 2005-05-12 09:59:06 -07:00
mincore.c 2.6.11 import 2005-05-12 09:59:06 -07:00
mlock.c 2.6.11 import 2005-05-12 09:59:06 -07:00
mmap.c [PATCH] Fix get_unmapped_area sanity tests 2005-05-26 21:20:00 -07:00
mprotect.c 2.6.11 import 2005-05-12 09:59:06 -07:00
mremap.c 2.6.11 import 2005-05-12 09:59:06 -07:00
msync.c 2.6.11 import 2005-05-12 09:59:06 -07:00
nommu.c 2.6.11 import 2005-05-12 09:59:06 -07:00
oom_kill.c 2.6.11 import 2005-05-12 09:59:06 -07:00
page-writeback.c 2.6.11 import 2005-05-12 09:59:06 -07:00
page_alloc.c 2.6.11 import 2005-05-12 09:59:06 -07:00
page_io.c 2.6.11 import 2005-05-12 09:59:06 -07:00
pdflush.c 2.6.11 import 2005-05-12 09:59:06 -07:00
prio_tree.c 2.6.11 import 2005-05-12 09:59:06 -07:00
readahead.c 2.6.11 import 2005-05-12 09:59:06 -07:00
rmap.c [PATCH] try_to_unmap_cluster() passes out-of-bounds pte to pte_unmap() 2005-06-11 19:45:21 -07:00
shmem.c 2.6.11 import 2005-05-12 09:59:06 -07:00
slab.c 2.6.11 import 2005-05-12 09:59:06 -07:00
swap.c 2.6.11 import 2005-05-12 09:59:06 -07:00
swap_state.c 2.6.11 import 2005-05-12 09:59:06 -07:00
swapfile.c 2.6.11 import 2005-05-12 09:59:06 -07:00
thrash.c 2.6.11 import 2005-05-12 09:59:06 -07:00
tiny-shmem.c 2.6.11 import 2005-05-12 09:59:06 -07:00
truncate.c 2.6.11 import 2005-05-12 09:59:06 -07:00
vmalloc.c 2.6.11 import 2005-05-12 09:59:06 -07:00
vmscan.c 2.6.11 import 2005-05-12 09:59:06 -07:00