All of lore.kernel.org
 help / color / mirror / Atom feed
* + vm-security-add-security-hook-to-do_brk.patch added to -mm tree
@ 2007-12-04 20:18 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2007-12-04 20:18 UTC (permalink / raw)
  To: mm-commits; +Cc: eparis, alan, chrisw, jmorris, sds


The patch titled
     VM/Security: add security hook to do_brk
has been added to the -mm tree.  Its filename is
     vm-security-add-security-hook-to-do_brk.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: VM/Security: add security hook to do_brk
From: Eric Paris <eparis@redhat.com>

Given a specifically crafted binary do_brk() can be used to get low pages
available in userspace virtual memory and can thus be used to circumvent
the mmap_min_addr low memory protection.  Add security checks in do_brk().

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Alan Cox <alan@redhat.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: James Morris <jmorris@namei.org>
Cc: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/mmap.c |    4 ++++
 1 file changed, 4 insertions(+)

diff -puN mm/mmap.c~vm-security-add-security-hook-to-do_brk mm/mmap.c
--- a/mm/mmap.c~vm-security-add-security-hook-to-do_brk
+++ a/mm/mmap.c
@@ -1946,6 +1946,10 @@ unsigned long do_brk(unsigned long addr,
 	if (is_hugepage_only_range(mm, addr, len))
 		return -EINVAL;
 
+	error = security_file_mmap(0, 0, 0, 0, addr, 1);
+	if (error)
+		return error;
+
 	flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags;
 
 	error = arch_mmap_check(addr, len, flags);
_

Patches currently in -mm which might be from eparis@redhat.com are

git-selinux.patch
vm-security-add-security-hook-to-do_brk.patch
do_wait-cleanup-delay_group_leader-usage.patch
do_wait-fix-security-checks.patch
do_wait-fix-security-checks-fix.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-12-04 20:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-04 20:18 + vm-security-add-security-hook-to-do_brk.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.