summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-kernel/compaq-sources/ChangeLog10
-rw-r--r--sys-kernel/compaq-sources/compaq-sources-2.4.9.32.7-r6.ebuild (renamed from sys-kernel/compaq-sources/compaq-sources-2.4.9.32.7-r5.ebuild)3
-rw-r--r--sys-kernel/compaq-sources/files/compaq-sources-2.4.9.32.7.I2C_Limits.patch44
-rw-r--r--sys-kernel/compaq-sources/files/digest-compaq-sources-2.4.9.32.7-r6 (renamed from sys-kernel/compaq-sources/files/digest-compaq-sources-2.4.9.32.7-r5)0
4 files changed, 55 insertions, 2 deletions
diff --git a/sys-kernel/compaq-sources/ChangeLog b/sys-kernel/compaq-sources/ChangeLog
index e0f397d45f95..a47c92a2568f 100644
--- a/sys-kernel/compaq-sources/ChangeLog
+++ b/sys-kernel/compaq-sources/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-kernel/compaq-sources
# Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/compaq-sources/ChangeLog,v 1.7 2004/05/29 10:54:40 plasmaroo Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/compaq-sources/ChangeLog,v 1.8 2004/06/19 10:45:30 plasmaroo Exp $
+
+*compaq-sources-2.4.9.32.7-r6 (19 Jun 2004)
+
+ 19 Jun 2004; <plasmaroo@gentoo.org> -compaq-sources-2.4.9.32.7-r5.ebuild,
+ +compaq-sources-2.4.9.32.7-r6.ebuild,
+ +files/compaq-sources-2.4.9.32.7.I2C_Limits.patch:
+ Added a patch to add in missing sanity checks that were added upstream in
+ 2.4.21.
*compaq-sources-2.4.9.32.7-r5 (29 May 2004)
diff --git a/sys-kernel/compaq-sources/compaq-sources-2.4.9.32.7-r5.ebuild b/sys-kernel/compaq-sources/compaq-sources-2.4.9.32.7-r6.ebuild
index 784f35c1d288..d060bebecd5b 100644
--- a/sys-kernel/compaq-sources/compaq-sources-2.4.9.32.7-r5.ebuild
+++ b/sys-kernel/compaq-sources/compaq-sources-2.4.9.32.7-r6.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/compaq-sources/compaq-sources-2.4.9.32.7-r5.ebuild,v 1.1 2004/05/29 10:54:40 plasmaroo Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/compaq-sources/compaq-sources-2.4.9.32.7-r6.ebuild,v 1.1 2004/06/19 10:45:30 plasmaroo Exp $
ETYPE="sources"
inherit kernel eutils
@@ -60,6 +60,7 @@ src_unpack() {
epatch ${FILESDIR}/${P}.CAN-2004-0394.patch || die "Failed to add the CAN-2004-0394 patch!"
epatch ${FILESDIR}/${P}.CAN-2004-0427.patch || die "Failed to add the CAN-2004-0427 patch!"
epatch ${FILESDIR}/${P}.do_brk.patch || die "Failed to patch do_brk() vulnerability!"
+ epatch ${FILESDIR}/${P}.I2C_Limits.patch || die "Failed to patch the I2C i2cdev_ioctl() kmalloc() bug!"
epatch ${FILESDIR}/${P}.rtc_fix.patch || die "Failed to patch RTC vulnerabilities!"
epatch ${FILESDIR}/${P}.munmap.patch || die "Failed to apply munmap patch!"
diff --git a/sys-kernel/compaq-sources/files/compaq-sources-2.4.9.32.7.I2C_Limits.patch b/sys-kernel/compaq-sources/files/compaq-sources-2.4.9.32.7.I2C_Limits.patch
new file mode 100644
index 000000000000..af20a6fc0c2c
--- /dev/null
+++ b/sys-kernel/compaq-sources/files/compaq-sources-2.4.9.32.7.I2C_Limits.patch
@@ -0,0 +1,44 @@
+--- linux-2.4.20/drivers/i2c/i2c-dev.c 2004-06-19 03:27:30 -07:00
++++ linux-2.4.21/drivers/i2c/i2c-dev.c 2004-06-19 03:27:30 -07:00
+@@ -254,6 +254,11 @@
+ sizeof(rdwr_arg)))
+ return -EFAULT;
+
++ /* Put an arbritrary limit on the number of messages that can
++ * be sent at once */
++ if (rdwr_arg.nmsgs > 42)
++ return -EINVAL;
++
+ rdwr_pa = (struct i2c_msg *)
+ kmalloc(rdwr_arg.nmsgs * sizeof(struct i2c_msg),
+ GFP_KERNEL);
+@@ -270,6 +275,11 @@
+ res = -EFAULT;
+ break;
+ }
++ /* Limit the size of the message to a sane amount */
++ if (rdwr_pa[i].len > 8192) {
++ res = -EINVAL;
++ break;
++ }
+ rdwr_pa[i].buf = kmalloc(rdwr_pa[i].len, GFP_KERNEL);
+ if(rdwr_pa[i].buf == NULL)
+ {
+@@ -280,10 +290,16 @@
+ rdwr_arg.msgs[i].buf,
+ rdwr_pa[i].len))
+ {
+- kfree(rdwr_pa[i].buf);
+ res = -EFAULT;
+ break;
+ }
++ }
++ if (res < 0) {
++ int j;
++ for (j = 0; j < i; ++j)
++ kfree(rdwr_pa[j].buf);
++ kfree(rdwr_pa);
++ return res;
+ }
+ if (!res)
+ {
diff --git a/sys-kernel/compaq-sources/files/digest-compaq-sources-2.4.9.32.7-r5 b/sys-kernel/compaq-sources/files/digest-compaq-sources-2.4.9.32.7-r6
index 96283e409fc6..96283e409fc6 100644
--- a/sys-kernel/compaq-sources/files/digest-compaq-sources-2.4.9.32.7-r5
+++ b/sys-kernel/compaq-sources/files/digest-compaq-sources-2.4.9.32.7-r6