projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e14d95f
)
[PATCH] Fix MADV_REMOVE protection checking
author
Hugh Dickins
<hugh@veritas.com>
Mon, 17 Apr 2006 21:46:32 +0000
(22:46 +0100)
committer
Linus Torvalds
<torvalds@g5.osdl.org>
Tue, 18 Apr 2006 01:22:18 +0000
(18:22 -0700)
madvise_remove needs to respect file and mmap protections.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
[ Will the real CVE-2006-1524 stand up, please.. ]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/madvise.c
patch
|
blob
|
blame
|
history
diff --git
a/mm/madvise.c
b/mm/madvise.c
index af3d573b014122f7fd2a99c3ee90c3826f70457f..4e196155a0c3635801bd0f8dcff0b18ce1bbcf37 100644
(file)
--- a/
mm/madvise.c
+++ b/
mm/madvise.c
@@
-168,6
+168,9
@@
static long madvise_remove(struct vm_area_struct *vma,
return -EINVAL;
}
+ if ((vma->vm_flags & (VM_SHARED|VM_WRITE)) != (VM_SHARED|VM_WRITE))
+ return -EACCES;
+
mapping = vma->vm_file->f_mapping;
offset = (loff_t)(start - vma->vm_start)