From: "Oliver Pinter" <oliver.pntr@gmail.com>
To: stable@kernel.org
Cc: linux-kernel@vger.kernel.org,
"chrisw@sous-sol.org" <chrisw@sous-sol.org>,
"Greg KH" <gregkh@suse.de>, "Willy Tarreau" <w@1wt.eu>,
"Adrian Bunk" <bunk@kernel.org>, "Nick Piggin" <npiggin@suse.de>
Subject: {2.6.22.y} CVE-2007-6434
Date: Mon, 4 Feb 2008 21:13:16 +0100 [thread overview]
Message-ID: <6101e8c40802041213y4f3cb310qaff40052ed18d5df@mail.gmail.com> (raw)
mainline: ecaf18c15aac8bb9bed7b7aa0e382fe252e275d5
--->8---
commit ecaf18c15aac8bb9bed7b7aa0e382fe252e275d5
Author: Eric Paris <eparis@redhat.com>
Date: Tue Dec 4 23:45:31 2007 -0800
VM/Security: add security hook to do_brk
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
diff --git a/mm/mmap.c b/mm/mmap.c
index facc1a7..acfc13f 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1934,6 +1934,10 @@ unsigned long do_brk(unsigned long addr, unsigned long le
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);
---8<---
--
Thanks,
Oliver
next reply other threads:[~2008-02-04 20:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-04 20:13 Oliver Pinter [this message]
2008-02-04 20:14 ` Oliver Pinter
2008-02-04 21:02 ` Oliver Pinter
2008-02-04 21:38 ` Greg KH
2008-02-04 21:34 ` Chris Wright
2008-02-04 21:36 ` Oliver Pinter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6101e8c40802041213y4f3cb310qaff40052ed18d5df@mail.gmail.com \
--to=oliver.pntr@gmail.com \
--cc=bunk@kernel.org \
--cc=chrisw@sous-sol.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@suse.de \
--cc=stable@kernel.org \
--cc=w@1wt.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®