diff options
author | Rik van Riel <riel@redhat.com> | 2014-01-02 21:58:46 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-02 23:40:30 +0100 |
commit | 4eb919825e6c3c7fb3630d5621f6d11e98a18b3a (patch) | |
tree | 826d9e3d7852f7d2214a31bcca050bcd5573e667 /mm/memcontrol.c | |
parent | mm: munlock: fix deadlock in __munlock_pagevec() (diff) | |
download | linux-4eb919825e6c3c7fb3630d5621f6d11e98a18b3a.tar.xz linux-4eb919825e6c3c7fb3630d5621f6d11e98a18b3a.zip |
mm: fix use-after-free in sys_remap_file_pages
remap_file_pages calls mmap_region, which may merge the VMA with other
existing VMAs, and free "vma". This can lead to a use-after-free bug.
Avoid the bug by remembering vm_flags before calling mmap_region, and
not trying to dereference vma later.
Signed-off-by: Rik van Riel <riel@redhat.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Cc: PaX Team <pageexec@freemail.hu>
Cc: Kees Cook <keescook@chromium.org>
Cc: Michel Lespinasse <walken@google.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memcontrol.c')
0 files changed, 0 insertions, 0 deletions