diff options
author | Tim Yamin <plasmaroo@gentoo.org> | 2004-11-27 18:25:13 +0000 |
---|---|---|
committer | Tim Yamin <plasmaroo@gentoo.org> | 2004-11-27 18:25:13 +0000 |
commit | bda24058e73acbbf3e4f6f47fe3fc87d524e0e0b (patch) | |
tree | ab71c3aca1ba747af1049e1f25634367fb6722a0 /sys-kernel/uclinux-sources | |
parent | Version bump to 1.0.1 (Manifest recommit) (diff) | |
download | gentoo-2-bda24058e73acbbf3e4f6f47fe3fc87d524e0e0b.tar.gz gentoo-2-bda24058e73acbbf3e4f6f47fe3fc87d524e0e0b.tar.bz2 gentoo-2-bda24058e73acbbf3e4f6f47fe3fc87d524e0e0b.zip |
Version bump for the AF_UNIX and a.out security vulnerabilities; bugs #72452 and #72317.
Diffstat (limited to 'sys-kernel/uclinux-sources')
-rw-r--r-- | sys-kernel/uclinux-sources/ChangeLog | 13 | ||||
-rw-r--r-- | sys-kernel/uclinux-sources/files/digest-uclinux-sources-2.4.26_p0-r10 (renamed from sys-kernel/uclinux-sources/files/digest-uclinux-sources-2.4.26_p0-r9) | 0 | ||||
-rw-r--r-- | sys-kernel/uclinux-sources/files/digest-uclinux-sources-2.6.7_p0-r10 (renamed from sys-kernel/uclinux-sources/files/digest-uclinux-sources-2.6.7_p0-r9) | 0 | ||||
-rw-r--r-- | sys-kernel/uclinux-sources/files/uclinux-sources-2.4.26_p0.binfmt_a.out.patch | 63 | ||||
-rw-r--r-- | sys-kernel/uclinux-sources/files/uclinux-sources-2.6.binfmt_a.out.patch | 63 | ||||
-rw-r--r-- | sys-kernel/uclinux-sources/files/uclinux-sources.AF_UNIX.patch | 24 | ||||
-rw-r--r-- | sys-kernel/uclinux-sources/uclinux-sources-2.4.26_p0-r10.ebuild (renamed from sys-kernel/uclinux-sources/uclinux-sources-2.4.26_p0-r9.ebuild) | 4 | ||||
-rw-r--r-- | sys-kernel/uclinux-sources/uclinux-sources-2.6.7_p0-r10.ebuild (renamed from sys-kernel/uclinux-sources/uclinux-sources-2.6.7_p0-r9.ebuild) | 4 |
8 files changed, 168 insertions, 3 deletions
diff --git a/sys-kernel/uclinux-sources/ChangeLog b/sys-kernel/uclinux-sources/ChangeLog index 579860452982..509ba29bb66c 100644 --- a/sys-kernel/uclinux-sources/ChangeLog +++ b/sys-kernel/uclinux-sources/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for sys-kernel/uclinux-sources # Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/uclinux-sources/ChangeLog,v 1.22 2004/11/20 11:26:08 plasmaroo Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/uclinux-sources/ChangeLog,v 1.23 2004/11/27 18:25:13 plasmaroo Exp $ + +*uclinux-sources-2.6.7_p0-r10 (27 Nov 2004) + + 27 Nov 2004; <plasmaroo@gentoo.org> +uclinux-sources-2.4.26_p0-r10.ebuild, + -uclinux-sources-2.4.26_p0-r9.ebuild, +uclinux-sources-2.6.7_p0-r10.ebuild, + -uclinux-sources-2.6.7_p0-r9.ebuild, + +files/uclinux-sources-2.4.26_p0.binfmt_a.out.patch, + +files/uclinux-sources-2.6.binfmt_a.out.patch, + +files/uclinux-sources.AF_UNIX.patch: + Version bump for the AF_UNIX and a.out security vulnerabilities; bugs #72452 + and #72317. *uclinux-sources-2.4.26_p0-r9 (20 Nov 2004) diff --git a/sys-kernel/uclinux-sources/files/digest-uclinux-sources-2.4.26_p0-r9 b/sys-kernel/uclinux-sources/files/digest-uclinux-sources-2.4.26_p0-r10 index 8629e7c2dfd9..8629e7c2dfd9 100644 --- a/sys-kernel/uclinux-sources/files/digest-uclinux-sources-2.4.26_p0-r9 +++ b/sys-kernel/uclinux-sources/files/digest-uclinux-sources-2.4.26_p0-r10 diff --git a/sys-kernel/uclinux-sources/files/digest-uclinux-sources-2.6.7_p0-r9 b/sys-kernel/uclinux-sources/files/digest-uclinux-sources-2.6.7_p0-r10 index 7284efa84cfa..7284efa84cfa 100644 --- a/sys-kernel/uclinux-sources/files/digest-uclinux-sources-2.6.7_p0-r9 +++ b/sys-kernel/uclinux-sources/files/digest-uclinux-sources-2.6.7_p0-r10 diff --git a/sys-kernel/uclinux-sources/files/uclinux-sources-2.4.26_p0.binfmt_a.out.patch b/sys-kernel/uclinux-sources/files/uclinux-sources-2.4.26_p0.binfmt_a.out.patch new file mode 100644 index 000000000000..4644ae28bce4 --- /dev/null +++ b/sys-kernel/uclinux-sources/files/uclinux-sources-2.4.26_p0.binfmt_a.out.patch @@ -0,0 +1,63 @@ +diff -Nru linux-2.4.28/fs/exec.c linux-2.4.28.plasmaroo/fs/exec.c +--- linux-2.4.28/fs/exec.c 2004-04-15 10:44:45 -07:00 ++++ linux-2.4.28.plasmaroo/fs/exec.c 2004-11-12 12:02:40 -08:00 +@@ -342,6 +342,7 @@ int setup_arg_pages(struct linux_binprm + + down_write(¤t->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; +@@ -351,6 +352,12 @@ int setup_arg_pages(struct linux_binprm + 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(¤t->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 -Nru linux-2.4.28/fs/exec.c linux-2.4.28.plasmaroo/fs/exec.c +--- linux-2.4.28/fs/binfmt_aout.c 2002-02-04 23:54:04 -08:00 ++++ linux-2.4.28.plasmaroo/fs/binfmt_aout.c 2004-11-12 11:55:14 -08:00 +@@ -39,13 +39,18 @@ static struct linux_binfmt aout_format = + 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; + } + + /* +@@ -405,7 +410,11 @@ static int load_aout_binary(struct linux + 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 --git a/sys-kernel/uclinux-sources/files/uclinux-sources-2.6.binfmt_a.out.patch b/sys-kernel/uclinux-sources/files/uclinux-sources-2.6.binfmt_a.out.patch new file mode 100644 index 000000000000..89665ce8db42 --- /dev/null +++ b/sys-kernel/uclinux-sources/files/uclinux-sources-2.6.binfmt_a.out.patch @@ -0,0 +1,63 @@ +diff -Nru linux-2.6.9/fs/exec.c linux-2.6.9.plasmaroo/fs/exec.c +--- linux-2.6.9/fs/exec.c 2004-11-27 08:30:03 -08:00 ++++ linux-2.6.9.plasmaroo/fs/exec.c 2004-11-27 08:30:03 -08:00 +@@ -413,6 +413,7 @@ + + down_write(&mm->mmap_sem); + { ++ struct vm_area_struct *vma; + mpnt->vm_mm = mm; + #ifdef CONFIG_STACK_GROWSUP + mpnt->vm_start = stack_base; +@@ -433,6 +434,12 @@ + mpnt->vm_flags = VM_STACK_FLAGS; + mpnt->vm_flags |= mm->def_flags; + mpnt->vm_page_prot = protection_map[mpnt->vm_flags & 0x7]; ++ vma = find_vma(mm, mpnt->vm_start); ++ if (vma) { ++ up_write(&mm->mmap_sem); ++ kmem_cache_free(vm_area_cachep, mpnt); ++ return -ENOMEM; ++ } + insert_vm_struct(mm, mpnt); + mm->stack_vm = mm->total_vm = vma_pages(mpnt); + } +diff -Nru linux-2.6.9/fs/binfmt_aout.c linux-2.6.9.plasmaroo/fs/binfmt_aout.c +--- linux-2.6.9/fs/binfmt_aout.c 2004-11-27 08:31:43 -08:00 ++++ linux-2.6.9.plasmaroo/fs/binfmt_aout.c 2004-11-27 08:31:43 -08:00 +@@ -43,13 +43,18 @@ + .min_coredump = 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; + } + + /* +@@ -413,7 +418,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, EXSTACK_DEFAULT); + if (retval < 0) { diff --git a/sys-kernel/uclinux-sources/files/uclinux-sources.AF_UNIX.patch b/sys-kernel/uclinux-sources/files/uclinux-sources.AF_UNIX.patch new file mode 100644 index 000000000000..6ced78404a2d --- /dev/null +++ b/sys-kernel/uclinux-sources/files/uclinux-sources.AF_UNIX.patch @@ -0,0 +1,24 @@ +--- linux-2.4.27/net/unix/af_unix.c 2004-11-24 08:23:21 -08:00 ++++ linux-2.4.28/net/unix/af_unix.c 2004-11-24 08:23:21 -08:00 +@@ -1403,9 +1403,11 @@ + + msg->msg_namelen = 0; + ++ down(&sk->protinfo.af_unix.readsem); ++ + skb = skb_recv_datagram(sk, flags, noblock, &err); + if (!skb) +- goto out; ++ goto out_unlock; + + wake_up_interruptible(&sk->protinfo.af_unix.peer_wait); + +@@ -1449,6 +1451,8 @@ + + out_free: + skb_free_datagram(sk,skb); ++out_unlock: ++ up(&sk->protinfo.af_unix.readsem); + out: + return err; + } diff --git a/sys-kernel/uclinux-sources/uclinux-sources-2.4.26_p0-r9.ebuild b/sys-kernel/uclinux-sources/uclinux-sources-2.4.26_p0-r10.ebuild index edbe57424db4..b0d81b4d50cb 100644 --- a/sys-kernel/uclinux-sources/uclinux-sources-2.4.26_p0-r9.ebuild +++ b/sys-kernel/uclinux-sources/uclinux-sources-2.4.26_p0-r10.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/uclinux-sources/uclinux-sources-2.4.26_p0-r9.ebuild,v 1.1 2004/11/20 11:26:08 plasmaroo Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/uclinux-sources/uclinux-sources-2.4.26_p0-r10.ebuild,v 1.1 2004/11/27 18:25:13 plasmaroo Exp $ IUSE="" @@ -59,6 +59,8 @@ src_unpack() { epatch ${FILESDIR}/${P}.XDRWrapFix.patch || die "Failed to apply the kNFSd XDR patch!" epatch ${FILESDIR}/${P}.binfmt_elf.patch || die "Failed to apply the binfmt_elf patch!" epatch ${FILESDIR}/${P}.smbfs.patch || die "Failed to apply the SMBFS patch!" + epatch ${FILESDIR}/${PN}.AF_UNIX.patch || die "Failed to apply the AF_UNIX patch!" + epatch ${FILESDIR}/${P}.binfmt_a.out.patch || die "Failed to apply the a.out patch!" kernel_universal_unpack set ARCH=${MY_ARCH} diff --git a/sys-kernel/uclinux-sources/uclinux-sources-2.6.7_p0-r9.ebuild b/sys-kernel/uclinux-sources/uclinux-sources-2.6.7_p0-r10.ebuild index 786f0ed11fd0..b8530ac0160c 100644 --- a/sys-kernel/uclinux-sources/uclinux-sources-2.6.7_p0-r9.ebuild +++ b/sys-kernel/uclinux-sources/uclinux-sources-2.6.7_p0-r10.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/uclinux-sources/uclinux-sources-2.6.7_p0-r9.ebuild,v 1.1 2004/11/20 11:26:08 plasmaroo Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/uclinux-sources/uclinux-sources-2.6.7_p0-r10.ebuild,v 1.1 2004/11/27 18:25:13 plasmaroo Exp $ IUSE="" @@ -52,6 +52,8 @@ src_unpack() { epatch ${FILESDIR}/${PN}-2.6.devPtmx.patch || die "Failed to apply /dev/ptmx patch!" epatch ${FILESDIR}/${PN}-2.6.binfmt_elf.patch || die "Failed to apply binfmt_elf patch!" epatch ${FILESDIR}/${PN}-2.6.smbfs.patch || die "Failed to apply SMBFS patch!" + epatch ${FILESDIR}/${PN}.AF_UNIX.patch || die "Failed to apply the AF_UNIX patch!" + epatch ${FILESDIR}/${PN}-2.6.binfmt_a.out.patch || die "Failed to apply the a.out patch!" set MY_ARCH=${ARCH} unset ARCH |