https://github.com/torvalds/linux
Revision 624483f3ea82598ab0f62f1bdb9177f531ab1892 authored by Andrey Ryabinin on 06 June 2014, 15:09:30 UTC, committed by Linus Torvalds on 06 June 2014, 15:53:41 UTC
While working address sanitizer for kernel I've discovered
use-after-free bug in __put_anon_vma.

For the last anon_vma, anon_vma->root freed before child anon_vma.
Later in anon_vma_free(anon_vma) we are referencing to already freed
anon_vma->root to check rwsem.

This fixes it by freeing the child anon_vma before freeing
anon_vma->root.

Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: <stable@vger.kernel.org> # v3.0+
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 951e273
History
Tip revision: 624483f3ea82598ab0f62f1bdb9177f531ab1892 authored by Andrey Ryabinin on 06 June 2014, 15:09:30 UTC
mm: rmap: fix use-after-free in __put_anon_vma
Tip revision: 624483f
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 1.1 KB
.mailmap -rw-r--r-- 4.4 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 93.6 KB
Kbuild -rw-r--r-- 2.5 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 272.1 KB
Makefile -rw-r--r-- 50.5 KB
README -rw-r--r-- 18.3 KB
REPORTING-BUGS -rw-r--r-- 7.3 KB

README

back to top