summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Ludd <solar@gentoo.org>2004-12-13 17:36:09 +0000
committerNed Ludd <solar@gentoo.org>2004-12-13 17:36:09 +0000
commit182b0ea71199bfddd6c3438065d43941b4b3e80a (patch)
treee12fbaed76e0b9baa485ed6365beca0b4afb591f /sys-kernel
parentPATCH_VER 0.2.11. (fd.o #1934, #47922) Add the highly demanded fix for DPMS p... (diff)
downloadgentoo-2-182b0ea71199bfddd6c3438065d43941b4b3e80a.tar.gz
gentoo-2-182b0ea71199bfddd6c3438065d43941b4b3e80a.tar.bz2
gentoo-2-182b0ea71199bfddd6c3438065d43941b4b3e80a.zip
- update from tocharian, adds binfmt_aout patch back to 2.4.28. closes bug #72452
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/grsec-sources/ChangeLog8
-rw-r--r--sys-kernel/grsec-sources/Manifest7
-rw-r--r--sys-kernel/grsec-sources/files/2.4.28-binfmt_a.out.patch63
-rw-r--r--sys-kernel/grsec-sources/files/digest-grsec-sources-2.4.28.2.0.2-r12
-rw-r--r--sys-kernel/grsec-sources/grsec-sources-2.4.28.2.0.2-r1.ebuild35
-rw-r--r--sys-kernel/grsec-sources/metadata.xml4
6 files changed, 114 insertions, 5 deletions
diff --git a/sys-kernel/grsec-sources/ChangeLog b/sys-kernel/grsec-sources/ChangeLog
index 182588a7e1f7..9e41d9d00e08 100644
--- a/sys-kernel/grsec-sources/ChangeLog
+++ b/sys-kernel/grsec-sources/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-kernel/grsec-sources
# Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/grsec-sources/ChangeLog,v 1.37 2004/11/26 17:10:45 dsd Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/grsec-sources/ChangeLog,v 1.38 2004/12/13 17:36:09 solar Exp $
+
+*grsec-sources-2.4.28.2.0.2-r1 (13 Dec 2004)
+
+ 13 Dec 2004; <solar@gentoo.org> metadata.xml,
+ +files/2.4.28-binfmt_a.out.patch, +grsec-sources-2.4.28.2.0.2-r1.ebuild:
+ - update from tocharian, adds binfmt_aout patch back to 2.4.28
26 Nov 2004; Daniel Drake <dsd@gentoo.org>
-files/2.4.26-pax-binfmt_elf-page-size.patch,
diff --git a/sys-kernel/grsec-sources/Manifest b/sys-kernel/grsec-sources/Manifest
index 2d27e4047789..93ebde46f7ea 100644
--- a/sys-kernel/grsec-sources/Manifest
+++ b/sys-kernel/grsec-sources/Manifest
@@ -1,9 +1,12 @@
+MD5 da53c44837378c71a2c09d348654e605 grsec-sources-2.4.28.2.0.2-r1.ebuild 1248
MD5 17008d2d71faef9a97b8a2ce86f455ef grsec-sources-2.4.27.2.0.1-r4.ebuild 1738
MD5 7b224fc44044267d7d658337926ef322 grsec-sources-2.4.28.2.0.2.ebuild 1202
-MD5 c4d6cfc38895a5bdb839693448b104b8 ChangeLog 8198
-MD5 140d8af1d66f9f6cd030e7d9902f38d9 metadata.xml 478
+MD5 463e16898551b5a0dd7559aff2d5a34e ChangeLog 8433
+MD5 0b2ea9b53b5d526e39afbdc5040ff07a metadata.xml 487
MD5 3dac23b6e285462a7cda41505cc698e1 files/2.4.26-CAN-2004-0394.patch 319
MD5 f0aff4d717032ce77283fe63d6df94ec files/digest-grsec-sources-2.4.27.2.0.1-r4 462
MD5 b293289df61d6f42ff54e4e0ceae53cf files/2.4.24-x86.config 2397
MD5 c829ff92477a5a9e4fcbc370303217f8 files/digest-grsec-sources-2.4.28.2.0.2 144
+MD5 4a0215139f9aebfe2cc2747743763f08 files/2.4.28-binfmt_a.out.patch 1887
+MD5 c829ff92477a5a9e4fcbc370303217f8 files/digest-grsec-sources-2.4.28.2.0.2-r1 144
MD5 d1ccc2047be533c992f67270a150a210 files/2.4.27-cmdline-race.patch 388
diff --git a/sys-kernel/grsec-sources/files/2.4.28-binfmt_a.out.patch b/sys-kernel/grsec-sources/files/2.4.28-binfmt_a.out.patch
new file mode 100644
index 000000000000..16e06c44b5b4
--- /dev/null
+++ b/sys-kernel/grsec-sources/files/2.4.28-binfmt_a.out.patch
@@ -0,0 +1,63 @@
+diff -Nru linux-2.4.28/fs/binfmt_aout.c linux-2.4.28-hardened/fs/binfmt_aout.c
+--- linux-2.4.28/fs/binfmt_aout.c 2004-11-28 15:44:03.000000000 -0500
++++ linux-2.4.28-hardened/fs/binfmt_aout.c 2004-11-28 16:05:16.000000000 -0500
+@@ -39,13 +39,18 @@
+ NULL, THIS_MODULE, load_aout_binary, load_aout_library, aout_core_dump, PAGE_SIZE
+ };
+
+-static void set_brk(unsigned long start, unsigned long end)
++#define BAD_ADDR(x) ((unsigned long)(x) >= TASK_SIZE)
++
++static int set_brk(unsigned long start, unsigned long end)
+ {
+ start = PAGE_ALIGN(start);
+ end = PAGE_ALIGN(end);
+- if (end <= start)
+- return;
+- do_brk(start, end - start);
++ if (end > start) {
++ unsigned long addr = do_brk(start, end - start);
++ if (BAD_ADDR(addr))
++ return addr;
++ }
++ return 0;
+ }
+
+ /*
+@@ -429,7 +434,11 @@
+ beyond_if:
+ set_binfmt(&aout_format);
+
+- set_brk(current->mm->start_brk, current->mm->brk);
++ retval = set_brk(current->mm->start_brk, current->mm->brk);
++ if (retval < 0) {
++ send_sig(SIGKILL, current, 0);
++ return retval;
++ }
+
+ retval = setup_arg_pages(bprm);
+ if (retval < 0) {
+diff -Nru linux-2.4.28/fs/exec.c linux-2.4.28-hardened/fs/exec.c
+--- linux-2.4.28/fs/exec.c 2004-11-28 15:44:03.000000000 -0500
++++ linux-2.4.28-hardened/fs/exec.c 2004-11-28 16:05:16.000000000 -0500
+@@ -387,6 +387,7 @@
+
+ down_write(&current->mm->mmap_sem);
+ {
++ struct vm_area_struct *vma;
+ mpnt->vm_mm = current->mm;
+ mpnt->vm_start = PAGE_MASK & (unsigned long) bprm->p;
+ mpnt->vm_end = STACK_TOP;
+@@ -401,6 +402,12 @@
+ mpnt->vm_pgoff = 0;
+ mpnt->vm_file = NULL;
+ mpnt->vm_private_data = (void *) 0;
++ vma = find_vma(current->mm, mpnt->vm_start);
++ if (vma) {
++ up_write(&current->mm->mmap_sem);
++ kmem_cache_free(vm_area_cachep, mpnt);
++ return -ENOMEM;
++ }
+ insert_vm_struct(current->mm, mpnt);
+ current->mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
+
diff --git a/sys-kernel/grsec-sources/files/digest-grsec-sources-2.4.28.2.0.2-r1 b/sys-kernel/grsec-sources/files/digest-grsec-sources-2.4.28.2.0.2-r1
new file mode 100644
index 000000000000..04b30398565d
--- /dev/null
+++ b/sys-kernel/grsec-sources/files/digest-grsec-sources-2.4.28.2.0.2-r1
@@ -0,0 +1,2 @@
+MD5 2f2e5e29772fdacd04129ba16a24afcf grsecurity-2.0.2-2.4.28.patch.gz 141933
+MD5 ac7735000d185bc7778c08288760a8a3 linux-2.4.28.tar.bz2 31064046
diff --git a/sys-kernel/grsec-sources/grsec-sources-2.4.28.2.0.2-r1.ebuild b/sys-kernel/grsec-sources/grsec-sources-2.4.28.2.0.2-r1.ebuild
new file mode 100644
index 000000000000..c9f33687eefd
--- /dev/null
+++ b/sys-kernel/grsec-sources/grsec-sources-2.4.28.2.0.2-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/grsec-sources/grsec-sources-2.4.28.2.0.2-r1.ebuild,v 1.1 2004/12/13 17:36:09 solar Exp $
+
+ETYPE="sources"
+UNIPATCH_STRICTORDER="yes"
+inherit kernel-2
+detect_version
+
+OKV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH/.*/}"
+PATCH_BASE="${PV/${OKV}./}"
+PATCH_BASE="${PATCH_BASE/_/-}"
+EXTRAVERSION="-grsec-${PATCH_BASE}"
+KV_FULL="${OKV}${EXTRAVERSION}"
+
+PATCH_SRC_BASE="grsecurity-${PATCH_BASE}-${OKV}.patch.gz"
+DESCRIPTION="Vanilla sources of the linux kernel with the grsecurity ${PATCH_BASE} patch"
+SRC_URI="http://grsecurity.net/grsecurity-${PATCH_BASE}-${OKV}.patch.gz \
+ http://www.kernel.org/pub/linux/kernel/v2.4/linux-${OKV}.tar.bz2"
+
+HOMEPAGE="http://www.kernel.org/ http://www.grsecurity.net"
+KEYWORDS="x86 sparc ppc alpha amd64 -hppa"
+RESTRICT="buildpkg"
+IUSE=""
+
+UNIPATCH_LIST="${DISTDIR}/${PATCH_SRC_BASE} \
+ ${FILESDIR}/2.4.28-binfmt_a.out.patch"
+
+src_unpack() {
+ kernel-2_src_unpack
+
+ # users are often confused by what settings should be set.
+ # so we provide an example of what a P4 desktop would look like.
+ cp ${FILESDIR}/2.4.24-x86.config gentoo-grsec-custom-example-2.4.2x-x86.config
+}
diff --git a/sys-kernel/grsec-sources/metadata.xml b/sys-kernel/grsec-sources/metadata.xml
index 994c241cec54..eeb0b7d80cf7 100644
--- a/sys-kernel/grsec-sources/metadata.xml
+++ b/sys-kernel/grsec-sources/metadata.xml
@@ -7,8 +7,8 @@
<description>Primary Maintainer</description>
</maintainer>
<maintainer>
- <email>pappy@gentoo.org</email>
- <description>HPPA Maintainer</description>
+ <email>tocharian@tocharian.org</email>
+ <description>Backup Maintainer</description>
</maintainer>
<longdescription>Vanilla sources of the linux kernel with the grsecurity patch</longdescription>
</pkgmetadata>