summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Yamin <plasmaroo@gentoo.org>2004-11-27 19:29:08 +0000
committerTim Yamin <plasmaroo@gentoo.org>2004-11-27 19:29:08 +0000
commitf5f39d48e2c7633da66a895da72b954fa5b67046 (patch)
tree328a85e0d774e6ae5c3612ec0db3abc582b195ff /sys-kernel
parentAdded backported fix from upstream that fixes compilation of the text fronten... (diff)
downloadgentoo-2-f5f39d48e2c7633da66a895da72b954fa5b67046.tar.gz
gentoo-2-f5f39d48e2c7633da66a895da72b954fa5b67046.tar.bz2
gentoo-2-f5f39d48e2c7633da66a895da72b954fa5b67046.zip
Version bump for the AF_UNIX and a.out security vulnerabilities; bugs #72452 and #72317.
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/win4lin-sources/ChangeLog13
-rw-r--r--sys-kernel/win4lin-sources/files/digest-win4lin-sources-2.4.26-r10 (renamed from sys-kernel/win4lin-sources/files/digest-win4lin-sources-2.4.26-r9)0
-rw-r--r--sys-kernel/win4lin-sources/files/digest-win4lin-sources-2.6.7-r95
-rw-r--r--sys-kernel/win4lin-sources/files/digest-win4lin-sources-2.6.9-r2 (renamed from sys-kernel/win4lin-sources/files/digest-win4lin-sources-2.6.9-r1)0
-rw-r--r--sys-kernel/win4lin-sources/files/win4lin-sources-2.4.26.binfmt_a.out.patch63
-rw-r--r--sys-kernel/win4lin-sources/files/win4lin-sources-2.6.6.FPULockup-53804.patch24
-rw-r--r--sys-kernel/win4lin-sources/files/win4lin-sources-2.6.7.smbfs.patch93
-rw-r--r--sys-kernel/win4lin-sources/files/win4lin-sources-2.6.9.binfmt_a.out.patch63
-rw-r--r--sys-kernel/win4lin-sources/files/win4lin-sources-2.6.CAN-2004-0596.patch46
-rw-r--r--sys-kernel/win4lin-sources/files/win4lin-sources-2.6.CAN-2004-0816.patch43
-rw-r--r--sys-kernel/win4lin-sources/files/win4lin-sources-2.6.IPTables-RDoS.patch11
-rw-r--r--sys-kernel/win4lin-sources/files/win4lin-sources-2.6.ProcPerms.patch49
-rw-r--r--sys-kernel/win4lin-sources/files/win4lin-sources-2.6.cmdlineLeak.patch12
-rw-r--r--sys-kernel/win4lin-sources/files/win4lin-sources-2.6.devPtmx.patch21
-rw-r--r--sys-kernel/win4lin-sources/files/win4lin-sources.AF_UNIX.patch24
-rw-r--r--sys-kernel/win4lin-sources/win4lin-sources-2.4.26-r10.ebuild (renamed from sys-kernel/win4lin-sources/win4lin-sources-2.4.26-r9.ebuild)4
-rw-r--r--sys-kernel/win4lin-sources/win4lin-sources-2.6.7-r9.ebuild42
-rw-r--r--sys-kernel/win4lin-sources/win4lin-sources-2.6.9-r2.ebuild (renamed from sys-kernel/win4lin-sources/win4lin-sources-2.6.9-r1.ebuild)8
18 files changed, 170 insertions, 351 deletions
diff --git a/sys-kernel/win4lin-sources/ChangeLog b/sys-kernel/win4lin-sources/ChangeLog
index 906e660bb0ca..3ada29a676f2 100644
--- a/sys-kernel/win4lin-sources/ChangeLog
+++ b/sys-kernel/win4lin-sources/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for sys-kernel/win4lin-sources
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/win4lin-sources/ChangeLog,v 1.42 2004/11/20 11:12:53 plasmaroo Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/win4lin-sources/ChangeLog,v 1.43 2004/11/27 19:29:08 plasmaroo Exp $
+
+*win4lin-sources-2.4.26-r10 (27 Nov 2004)
+
+ 27 Nov 2004; <plasmaroo@gentoo.org> +win4lin-sources-2.4.26-r10.ebuild,
+ -win4lin-sources-2.4.26-r9.ebuild, -win4lin-sources-2.6.7-r9.ebuild,
+ -win4lin-sources-2.6.9-r1.ebuild, +win4lin-sources-2.6.9-r2.ebuild,
+ +files/win4lin-sources-2.4.26.binfmt_a.out.patch,
+ +files/win4lin-sources-2.6.9.binfmt_a.out.patch,
+ +files/win4lin-sources.AF_UNIX.patch:
+ Version bump for the AF_UNIX and a.out security vulnerabilities; bugs #72452
+ and #72317.
*win4lin-sources-2.6.9-r1 (20 Nov 2004)
diff --git a/sys-kernel/win4lin-sources/files/digest-win4lin-sources-2.4.26-r9 b/sys-kernel/win4lin-sources/files/digest-win4lin-sources-2.4.26-r10
index 0299063fed16..0299063fed16 100644
--- a/sys-kernel/win4lin-sources/files/digest-win4lin-sources-2.4.26-r9
+++ b/sys-kernel/win4lin-sources/files/digest-win4lin-sources-2.4.26-r10
diff --git a/sys-kernel/win4lin-sources/files/digest-win4lin-sources-2.6.7-r9 b/sys-kernel/win4lin-sources/files/digest-win4lin-sources-2.6.7-r9
deleted file mode 100644
index 8b27416482b9..000000000000
--- a/sys-kernel/win4lin-sources/files/digest-win4lin-sources-2.6.7-r9
+++ /dev/null
@@ -1,5 +0,0 @@
-MD5 a74671ea68b0e3c609e8785ed8497c14 linux-2.6.7.tar.bz2 35092228
-MD5 45347c8bd1a1c791e9a12d1e09162f33 mki-adapter26_1_3_6.patch 127032
-MD5 e5b7ca075f0281509442913cbd09ca26 Kernel-Win4Lin3-2.6.7.patch 26620
-MD5 52996b643afbd6ed9ba38b9483c2cac3 linux-2.6.7-CAN-2004-0415.patch 112612
-MD5 2b9ae55d20ddea07eedab2147156584f linux-2.6.7-CAN-2004-0814.patch 131697
diff --git a/sys-kernel/win4lin-sources/files/digest-win4lin-sources-2.6.9-r1 b/sys-kernel/win4lin-sources/files/digest-win4lin-sources-2.6.9-r2
index 12075686996a..12075686996a 100644
--- a/sys-kernel/win4lin-sources/files/digest-win4lin-sources-2.6.9-r1
+++ b/sys-kernel/win4lin-sources/files/digest-win4lin-sources-2.6.9-r2
diff --git a/sys-kernel/win4lin-sources/files/win4lin-sources-2.4.26.binfmt_a.out.patch b/sys-kernel/win4lin-sources/files/win4lin-sources-2.4.26.binfmt_a.out.patch
new file mode 100644
index 000000000000..4644ae28bce4
--- /dev/null
+++ b/sys-kernel/win4lin-sources/files/win4lin-sources-2.4.26.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(&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;
+@@ -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(&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 -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/win4lin-sources/files/win4lin-sources-2.6.6.FPULockup-53804.patch b/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.6.FPULockup-53804.patch
deleted file mode 100644
index a813f48ec23b..000000000000
--- a/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.6.FPULockup-53804.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -Nru a/include/asm-i386/i387.h b/include/asm-i386/i387.h
---- a/include/asm-i386/i387.h 2004-05-06 12:26:10 -07:00
-+++ b/include/asm-i386/i387.h 2004-06-12 19:12:23 -07:00
-@@ -51,7 +51,7 @@
- #define __clear_fpu( tsk ) \
- do { \
- if ((tsk)->thread_info->status & TS_USEDFPU) { \
-- asm volatile("fwait"); \
-+ asm volatile("fnclex ; fwait"); \
- (tsk)->thread_info->status &= ~TS_USEDFPU; \
- stts(); \
- } \
-diff -Nru a/include/asm-x86_64/i387.h b/include/asm-x86_64/i387.h
---- a/include/asm-x86_64/i387.h 2004-06-13 20:43:56.742530792 +0100
-+++ a/include/asm-x86_64/i387.h 2004-06-13 20:42:59.200278544 +0100
-@@ -46,7 +46,7 @@
-
- #define clear_fpu(tsk) do { \
- if ((tsk)->thread_info->status & TS_USEDFPU) { \
-- asm volatile("fwait"); \
-+ asm volatile("fnclex; fwait"); \
- (tsk)->thread_info->status &= ~TS_USEDFPU; \
- stts(); \
- } \
diff --git a/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.7.smbfs.patch b/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.7.smbfs.patch
deleted file mode 100644
index 99401cf93a0e..000000000000
--- a/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.7.smbfs.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-diff -urN linux-2.6.8.1/fs/smbfs/proc.c linux-2.6.8.1.plasmaroo/fs/smbfs/proc.c
---- linux-2.6.8.1/fs/smbfs/proc.c 2004-08-24 17:15:57.000000000 +1000
-+++ linux-2.6.8.1.plasmaroo/fs/smbfs/proc.c 2004-11-06 11:27:20.000000000 +1100
-@@ -1427,9 +1427,9 @@
- * So we must first calculate the amount of padding used by the server.
- */
- data_off -= hdrlen;
-- if (data_off > SMB_READX_MAX_PAD) {
-- PARANOIA("offset is larger than max pad!\n");
-- PARANOIA("%d > %d\n", data_off, SMB_READX_MAX_PAD);
-+ if (data_off > SMB_READX_MAX_PAD || data_off < 0) {
-+ PARANOIA("offset is larger than SMB_READX_MAX_PAD or negative!\n");
-+ PARANOIA("%d > %d || %d < 0\n", data_off, SMB_READX_MAX_PAD, data_off);
- req->rq_rlen = req->rq_bufsize + 1;
- return;
- }
-diff -urN linux-2.6.8.1/fs/smbfs/request.c linux-2.6.8.1.plasmaroo/fs/smbfs/request.c
---- linux-2.6.8.1/fs/smbfs/request.c 2004-11-06 11:27:51.000000000 +1100
-+++ linux-2.6.8.1.plasmaroo/fs/smbfs/request.c 2004-11-06 11:27:20.000000000 +1100
-@@ -588,6 +588,10 @@
- data_count = WVAL(inbuf, smb_drcnt);
-
- /* Modify offset for the split header/buffer we use */
-+ if (data_offset < hdrlen)
-+ goto out_bad_data;
-+ if (parm_offset < hdrlen)
-+ goto out_bad_parm;
- data_offset -= hdrlen;
- parm_offset -= hdrlen;
-
-@@ -607,6 +611,10 @@
- req->rq_lparm = parm_count;
- req->rq_data = req->rq_buffer + data_offset;
- req->rq_parm = req->rq_buffer + parm_offset;
-+ if (parm_offset + parm_count > req->rq_rlen)
-+ goto out_bad_parm;
-+ if (data_offset + data_count > req->rq_rlen)
-+ goto out_bad_data;
- return 0;
- }
-
-@@ -634,6 +642,7 @@
- req->rq_trans2buffer = smb_kmalloc(buf_len, GFP_NOFS);
- if (!req->rq_trans2buffer)
- goto out_no_mem;
-+ memset(req->rq_trans2buffer, 0, buf_len);
-
- req->rq_parm = req->rq_trans2buffer;
- req->rq_data = req->rq_trans2buffer + parm_tot;
-@@ -643,8 +652,12 @@
-
- if (parm_disp + parm_count > req->rq_total_parm)
- goto out_bad_parm;
-+ if (parm_offset + parm_count > req->rq_rlen)
-+ goto out_bad_parm;
- if (data_disp + data_count > req->rq_total_data)
- goto out_bad_data;
-+ if (data_offset + data_count > req->rq_rlen)
-+ goto out_bad_data;
-
- inbuf = req->rq_buffer;
- memcpy(req->rq_parm + parm_disp, inbuf + parm_offset, parm_count);
-@@ -657,8 +670,11 @@
- * Check whether we've received all of the data. Note that
- * we use the packet totals -- total lengths might shrink!
- */
-- if (req->rq_ldata >= data_tot && req->rq_lparm >= parm_tot)
-+ if (req->rq_ldata >= data_tot && req->rq_lparm >= parm_tot) {
-+ req->rq_ldata = data_tot;
-+ req->rq_lparm = parm_tot;
- return 0;
-+ }
- return 1;
-
- out_too_long:
-@@ -676,13 +692,13 @@
- req->rq_errno = -EIO;
- goto out;
- out_bad_parm:
-- printk(KERN_ERR "smb_trans2: invalid parms, disp=%d, cnt=%d, tot=%d\n",
-- parm_disp, parm_count, parm_tot);
-+ printk(KERN_ERR "smb_trans2: invalid parms, disp=%d, cnt=%d, tot=%d, ofs=%d\n",
-+ parm_disp, parm_count, parm_tot, parm_offset);
- req->rq_errno = -EIO;
- goto out;
- out_bad_data:
-- printk(KERN_ERR "smb_trans2: invalid data, disp=%d, cnt=%d, tot=%d\n",
-- data_disp, data_count, data_tot);
-+ printk(KERN_ERR "smb_trans2: invalid data, disp=%d, cnt=%d, tot=%d, ofs=%d\n",
-+ data_disp, data_count, data_tot, data_offset);
- req->rq_errno = -EIO;
- out:
- return req->rq_errno;
diff --git a/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.9.binfmt_a.out.patch b/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.9.binfmt_a.out.patch
new file mode 100644
index 000000000000..89665ce8db42
--- /dev/null
+++ b/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.9.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/win4lin-sources/files/win4lin-sources-2.6.CAN-2004-0596.patch b/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.CAN-2004-0596.patch
deleted file mode 100644
index 3e20a2e41372..000000000000
--- a/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.CAN-2004-0596.patch
+++ /dev/null
@@ -1,46 +0,0 @@
---- 1.13/drivers/net/eql.c 2004-07-21 03:13:40 -07:00
-+++ 1.14/drivers/net/eql.c 2004-07-21 03:13:40 -07:00
-@@ -495,6 +495,8 @@
- return -EFAULT;
-
- slave_dev = dev_get_by_name(sc.slave_name);
-+ if (!slave_dev)
-+ return -ENODEV;
-
- ret = -EINVAL;
-
-@@ -527,11 +529,13 @@
- if (copy_from_user(&sc, scp, sizeof (slave_config_t)))
- return -EFAULT;
-
-- eql = dev->priv;
- slave_dev = dev_get_by_name(sc.slave_name);
-+ if (!slave_dev)
-+ return -ENODEV;
-
- ret = -EINVAL;
-
-+ eql = dev->priv;
- spin_lock_bh(&eql->queue.lock);
- if (eql_is_slave(slave_dev)) {
- slave = __eql_find_slave_dev(&eql->queue, slave_dev);
---- 1.14/drivers/net/eql.c 2004-07-21 03:13:33 -07:00
-+++ 1.15/drivers/net/eql.c 2004-07-21 03:13:33 -07:00
-@@ -499,6 +499,8 @@
- return -ENODEV;
-
- ret = -EINVAL;
-+ if (!slave_dev)
-+ return ret;
-
- spin_lock_bh(&eql->queue.lock);
- if (eql_is_slave(slave_dev)) {
-@@ -534,6 +536,8 @@
- return -ENODEV;
-
- ret = -EINVAL;
-+ if (!slave_dev)
-+ return ret;
-
- eql = dev->priv;
- spin_lock_bh(&eql->queue.lock);
diff --git a/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.CAN-2004-0816.patch b/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.CAN-2004-0816.patch
deleted file mode 100644
index 13a9ea2f5aa4..000000000000
--- a/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.CAN-2004-0816.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Subject: Prevent ICMP crash in netfilter logging
-From: Olaf Kirch <okir@suse.de>
-References: 46016
-
-This patch fixes a remotely triggerable crash in the netfilter code
-when looking at ICMP unreachables. It dies when trying to copy
-BIGNUM bytes...
-
-Index: linux-2.6.5/net/ipv4/netfilter/ipt_LOG.c
-===================================================================
---- linux-2.6.5.orig/net/ipv4/netfilter/ipt_LOG.c 2004-02-19 11:36:37.000000000 +0100
-+++ linux-2.6.5/net/ipv4/netfilter/ipt_LOG.c 2004-09-24 15:48:54.000000000 +0200
-@@ -71,7 +71,7 @@
- printk("FRAG:%u ", ntohs(iph.frag_off) & IP_OFFSET);
-
- if ((info->logflags & IPT_LOG_IPOPT)
-- && iph.ihl * 4 != sizeof(struct iphdr)) {
-+ && iph.ihl * 4 > sizeof(struct iphdr)) {
- unsigned char opt[4 * 15 - sizeof(struct iphdr)];
- unsigned int i, optsize;
-
-@@ -138,7 +138,7 @@
- printk("URGP=%u ", ntohs(tcph.urg_ptr));
-
- if ((info->logflags & IPT_LOG_TCPOPT)
-- && tcph.doff * 4 != sizeof(struct tcphdr)) {
-+ && tcph.doff * 4 > sizeof(struct tcphdr)) {
- unsigned char opt[4 * 15 - sizeof(struct tcphdr)];
- unsigned int i, optsize;
-
-Index: linux-2.6.5/net/ipv6/netfilter/ip6t_LOG.c
-===================================================================
---- linux-2.6.5.orig/net/ipv6/netfilter/ip6t_LOG.c 2004-09-24 15:47:00.000000000 +0200
-+++ linux-2.6.5/net/ipv6/netfilter/ip6t_LOG.c 2004-09-24 15:48:35.000000000 +0200
-@@ -188,7 +188,7 @@
- printk("URGP=%u ", ntohs(tcph->urg_ptr));
-
- if ((info->logflags & IP6T_LOG_TCPOPT)
-- && tcph->doff * 4 != sizeof(struct tcphdr)) {
-+ && tcph->doff * 4 > sizeof(struct tcphdr)) {
- unsigned int i;
-
- /* Max length: 127 "OPT (" 15*4*2chars ") " */
diff --git a/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.IPTables-RDoS.patch b/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.IPTables-RDoS.patch
deleted file mode 100644
index 8f89d1605c9a..000000000000
--- a/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.IPTables-RDoS.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- net/ipv4/netfilter/ip_tables.c.orig 2004-04-04 05:36:47.000000000 +0200
-+++ net/ipv4/netfilter/ip_tables.c 2004-06-24 21:24:26.000000000 +0200
-@@ -1461,7 +1461,7 @@
- int *hotdrop)
- {
- /* tcp.doff is only 4 bits, ie. max 15 * 4 bytes */
-- char opt[60 - sizeof(struct tcphdr)];
-+ u_int8_t opt[60 - sizeof(struct tcphdr)];
- unsigned int i;
-
- duprintf("tcp_match: finding option\n");
diff --git a/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.ProcPerms.patch b/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.ProcPerms.patch
deleted file mode 100644
index d90b8d1815d4..000000000000
--- a/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.ProcPerms.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-# This is a BitKeeper generated diff -Nru style patch.
-#
-# ChangeSet
-# 2004/07/02 18:48:26-07:00 chrisw@osdl.org
-# [PATCH] check attr updates in /proc
-#
-# Any proc entry with default proc_file_inode_operations allow unauthorized
-# attribute updates. This is very dangerous for proc entries that rely
-# solely on file permissions for open/read/write.
-#
-# Signed-off-by: Chris Wright <chrisw@osdl.org>
-# Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-#
-# fs/proc/generic.c
-# 2004/07/02 15:47:55-07:00 chrisw@osdl.org +14 -7
-# check attr updates in /proc
-#
-diff -Nru a/fs/proc/generic.c b/fs/proc/generic.c
---- a/fs/proc/generic.c 2004-07-08 17:03:20 -07:00
-+++ b/fs/proc/generic.c 2004-07-08 17:03:20 -07:00
-@@ -231,14 +231,21 @@
- static int proc_notify_change(struct dentry *dentry, struct iattr *iattr)
- {
- struct inode *inode = dentry->d_inode;
-- int error = inode_setattr(inode, iattr);
-- if (!error) {
-- struct proc_dir_entry *de = PDE(inode);
-- de->uid = inode->i_uid;
-- de->gid = inode->i_gid;
-- de->mode = inode->i_mode;
-- }
-+ struct proc_dir_entry *de = PDE(inode);
-+ int error;
-
-+ error = inode_change_ok(inode, iattr);
-+ if (error)
-+ goto out;
-+
-+ error = inode_setattr(inode, iattr);
-+ if (error)
-+ goto out;
-+
-+ de->uid = inode->i_uid;
-+ de->gid = inode->i_gid;
-+ de->mode = inode->i_mode;
-+out:
- return error;
- }
-
diff --git a/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.cmdlineLeak.patch b/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.cmdlineLeak.patch
deleted file mode 100644
index 763f0cf64449..000000000000
--- a/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.cmdlineLeak.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- linux-2.6.7/fs/proc/base.c~ 2004-08-05 10:35:04.411443536 +0200
-+++ linux-2.6.7/fs/proc/base.c 2004-08-05 10:35:04.412443384 +0200
-@@ -330,6 +330,9 @@
- if (!mm)
- goto out;
-
-+ if (!mm->arg_end)
-+ goto out;
-+
- len = mm->arg_end - mm->arg_start;
-
- if (len > PAGE_SIZE)
diff --git a/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.devPtmx.patch b/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.devPtmx.patch
deleted file mode 100644
index 2312a2bf5e3b..000000000000
--- a/sys-kernel/win4lin-sources/files/win4lin-sources-2.6.devPtmx.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Index: linux-2.6.5/fs/devpts/inode.c
-===================================================================
---- linux-2.6.5.orig/fs/devpts/inode.c
-+++ linux-2.6.5/fs/devpts/inode.c
-@@ -178,9 +178,13 @@ struct tty_struct *devpts_get_tty(int nu
- {
- struct dentry *dentry = get_node(number);
- struct tty_struct *tty;
--
-- tty = (IS_ERR(dentry) || !dentry->d_inode) ? NULL :
-- dentry->d_inode->u.generic_ip;
-+
-+ tty = NULL;
-+ if (!IS_ERR(dentry)) {
-+ if (dentry->d_inode)
-+ tty = dentry->d_inode->u.generic_ip;
-+ dput(dentry);
-+ }
-
- up(&devpts_root->d_inode->i_sem);
-
diff --git a/sys-kernel/win4lin-sources/files/win4lin-sources.AF_UNIX.patch b/sys-kernel/win4lin-sources/files/win4lin-sources.AF_UNIX.patch
new file mode 100644
index 000000000000..6ced78404a2d
--- /dev/null
+++ b/sys-kernel/win4lin-sources/files/win4lin-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/win4lin-sources/win4lin-sources-2.4.26-r9.ebuild b/sys-kernel/win4lin-sources/win4lin-sources-2.4.26-r10.ebuild
index 3f0735b0f652..2cbb179efe8b 100644
--- a/sys-kernel/win4lin-sources/win4lin-sources-2.4.26-r9.ebuild
+++ b/sys-kernel/win4lin-sources/win4lin-sources-2.4.26-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/win4lin-sources/win4lin-sources-2.4.26-r9.ebuild,v 1.1 2004/11/20 11:12:53 plasmaroo Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/win4lin-sources/win4lin-sources-2.4.26-r10.ebuild,v 1.1 2004/11/27 19:29:08 plasmaroo Exp $
# OKV=original kernel version, KV=patched kernel version. They can be the same.
@@ -44,6 +44,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
}
diff --git a/sys-kernel/win4lin-sources/win4lin-sources-2.6.7-r9.ebuild b/sys-kernel/win4lin-sources/win4lin-sources-2.6.7-r9.ebuild
deleted file mode 100644
index 5ae437c455b9..000000000000
--- a/sys-kernel/win4lin-sources/win4lin-sources-2.6.7-r9.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/win4lin-sources/win4lin-sources-2.6.7-r9.ebuild,v 1.1 2004/11/20 11:12:53 plasmaroo Exp $
-
-ETYPE="sources"
-inherit kernel-2
-detect_version
-
-MKI_VERSION='1_3_6'
-UNIPATCH_LIST="
- ${DISTDIR}/Kernel-Win4Lin3-${OKV}.patch
- ${DISTDIR}/linux-${OKV}-CAN-2004-0415.patch
- ${DISTDIR}/linux-${OKV}-CAN-2004-0814.patch
- ${DISTDIR}/mki-adapter26_${MKI_VERSION}.patch:1
- ${FILESDIR}/${PN}.CAN-2004-0497.patch
- ${FILESDIR}/${PN}-2.6.CAN-2004-0596.patch
- ${FILESDIR}/${PN}-2.6.IPTables-RDoS.patch
- ${FILESDIR}/${PN}-2.6.ProcPerms.patch
- ${FILESDIR}/${PN}-2.6.cmdlineLeak.patch
- ${FILESDIR}/${PN}-2.6.CAN-2004-0816.patch
- ${FILESDIR}/${PN}-2.6.devPtmx.patch
- ${FILESDIR}/${PN}-2.6.binfmt_elf.patch
- ${FILESDIR}/${P}.smbfs.patch"
-
-S=${WORKDIR}/linux-${KV}
-
-DESCRIPTION="Full sources for the 2.6 of the Linux kernel with the Win4Lin patches"
-SRC_URI="mirror://kernel/linux/kernel/v2.6/linux-${OKV}.tar.bz2
- http://www.netraverse.com/member/downloads/files/mki-adapter26_${MKI_VERSION}.patch
- http://www.netraverse.com/member/downloads/files/Kernel-Win4Lin3-${OKV}.patch
- http://dev.gentoo.org/~plasmaroo/patches/kernel/misc/security/linux-${OKV}-CAN-2004-0415.patch
- http://dev.gentoo.org/~plasmaroo/patches/kernel/misc/security/linux-${OKV}-CAN-2004-0814.patch"
-
-# Best to keep "~x86" until Win4Lin-5.1.10 is in the tree and stable;
-# bug #55587.
-KEYWORDS="~x86 -*"
-SLOT="${KV}"
-
-K_EXTRAEINFO="If there are issues with this kernel, search http://bugs.gentoo.org/ for an
-existing bug. Only create a new bug if you have not found one that matches
-your issue. It is best to do an advanced search as the initial search has a
-very low yield. Please assign your bugs to x86-kernel@gentoo.org."
diff --git a/sys-kernel/win4lin-sources/win4lin-sources-2.6.9-r1.ebuild b/sys-kernel/win4lin-sources/win4lin-sources-2.6.9-r2.ebuild
index 12342f7d38d2..d626119cca3a 100644
--- a/sys-kernel/win4lin-sources/win4lin-sources-2.6.9-r1.ebuild
+++ b/sys-kernel/win4lin-sources/win4lin-sources-2.6.9-r2.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/win4lin-sources/win4lin-sources-2.6.9-r1.ebuild,v 1.1 2004/11/20 11:12:53 plasmaroo Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/win4lin-sources/win4lin-sources-2.6.9-r2.ebuild,v 1.1 2004/11/27 19:29:08 plasmaroo Exp $
ETYPE="sources"
inherit kernel-2
@@ -10,8 +10,10 @@ MKI_VERSION='1_3_8'
UNIPATCH_LIST="
${DISTDIR}/Kernel-Win4Lin3-${OKV}.patch
${DISTDIR}/mki-adapter26_${MKI_VERSION}.patch:1
- ${FILESDIR}/${PN}-2.6.9.binfmt_elf.patch
- ${FILESDIR}/${P}.smbfs.patch"
+ ${FILESDIR}/${P}.binfmt_elf.patch
+ ${FILESDIR}/${P}.binfmt_a.out.patch
+ ${FILESDIR}/${P}.smbfs.patch
+ ${FILESDIR}/${PN}.AF_UNIX.patch"
S=${WORKDIR}/linux-${KV}