diff options
author | Tim Yamin <plasmaroo@gentoo.org> | 2004-01-06 22:42:59 +0000 |
---|---|---|
committer | Tim Yamin <plasmaroo@gentoo.org> | 2004-01-06 22:42:59 +0000 |
commit | 7fc480376988e3ccd9f3b81a96ea4ea0b936859f (patch) | |
tree | 60bed66e9eb33a1d588504e137900ab9823a4b98 /sys-kernel | |
parent | Marked stable on hppa. (diff) | |
download | gentoo-2-7fc480376988e3ccd9f3b81a96ea4ea0b936859f.tar.gz gentoo-2-7fc480376988e3ccd9f3b81a96ea4ea0b936859f.tar.bz2 gentoo-2-7fc480376988e3ccd9f3b81a96ea4ea0b936859f.zip |
Added patches to address the security vulnerabilities in bugs #37292 and #37317. Headers also fixed.
Diffstat (limited to 'sys-kernel')
13 files changed, 391 insertions, 129 deletions
diff --git a/sys-kernel/openmosix-sources/ChangeLog b/sys-kernel/openmosix-sources/ChangeLog index e786232a5f56..89dbffaab963 100644 --- a/sys-kernel/openmosix-sources/ChangeLog +++ b/sys-kernel/openmosix-sources/ChangeLog @@ -1,6 +1,18 @@ # ChangeLog for sys-kernel/openmosix-sources # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/openmosix-sources/ChangeLog,v 1.31 2003/12/27 11:20:14 tantive Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/openmosix-sources/ChangeLog,v 1.32 2004/01/06 22:42:38 plasmaroo Exp $ + +*openmosix-sources-2.4.21-r2 (06 Jan 2004) + + 06 Jan 2004; <plasmaroo@gentoo.org> openmosix-sources-2.4.20-r6.ebuild, + openmosix-sources-2.4.20-r7.ebuild, openmosix-sources-2.4.21-r1.ebuild, + openmosix-sources-2.4.21-r2.ebuild, openmosix-sources-2.4.21.ebuild, + openmosix-sources-2.4.22-r2.ebuild, openmosix-sources-2.4.22-r3.ebuild, + files/openmosix-sources-2.4.20.rtc_fix.patch, + files/openmosix-sources-2.4.22.rtc_fix.patch, + files/openmosix-sources.CAN-2003-0985.patch: + Added patches to address the security vulnerabilities in bugs #37292 and + #37317. Unpatched revisions were removed. *openmosix-sources-2.4.21-r1 (27 Dec 2003) diff --git a/sys-kernel/openmosix-sources/Manifest b/sys-kernel/openmosix-sources/Manifest index d334189c1cd7..c7ae6ed2f305 100644 --- a/sys-kernel/openmosix-sources/Manifest +++ b/sys-kernel/openmosix-sources/Manifest @@ -1,11 +1,12 @@ -MD5 5de707573772ebd655af578010d11ab8 openmosix-sources-2.4.20-r6.ebuild 3254 -MD5 249fc41c404cdf5a1d7de7742a6ea215 openmosix-sources-2.4.21.ebuild 3254 +MD5 38b0cf297354bf9678cac5a017e0a6bd ChangeLog 3611 +MD5 ee8bd42965ef41f8a9019884d4eb429d openmosix-sources-2.4.20-r7.ebuild 3447 MD5 beb9efce81ae2c582a621528fc783095 metadata.xml 373 -MD5 1530e5efae61f6dc42b3362d147c4ae3 openmosix-sources-2.4.22-r2.ebuild 1337 -MD5 60b227238c6018a7c38822d59b2586af ChangeLog 3009 -MD5 159ecd2fa93e2d8014a53a0e1f382a09 openmosix-sources-2.4.21-r1.ebuild 3547 +MD5 6b20d3998682f6fd3bc73983546f459f openmosix-sources-2.4.21-r2.ebuild 3745 +MD5 716d1ba71d1c0fe73fd0b4cf9edbc035 openmosix-sources-2.4.22-r3.ebuild 1531 +MD5 8ea0ebaf9ea87558abecdc1df6145dc5 files/digest-openmosix-sources-2.4.20-r7 133 +MD5 efe1d77bc50e3b37a4dcc0154edd1862 files/digest-openmosix-sources-2.4.22-r3 134 +MD5 d641cd49ae63ca2989672d2209691bb5 files/openmosix-sources.CAN-2003-0985.patch 414 +MD5 e2e2b545b6fcdcecf49e33798efa5b84 files/openmosix-sources-2.4.22.rtc_fix.patch 7073 +MD5 518e0cc8ace05bda990128ccf3d11c32 files/digest-openmosix-sources-2.4.21-r2 192 +MD5 a61e57d5483a06f20da339d91f98fbb8 files/openmosix-sources-2.4.20.rtc_fix.patch 6769 MD5 b86824eda82b7145748fffb251dc62d4 files/do_brk_fix.patch 472 -MD5 f5cf28ccf74eccc21f96d399b429420b files/digest-openmosix-sources-2.4.21 134 -MD5 518e0cc8ace05bda990128ccf3d11c32 files/digest-openmosix-sources-2.4.21-r1 192 -MD5 efe1d77bc50e3b37a4dcc0154edd1862 files/digest-openmosix-sources-2.4.22-r2 134 -MD5 8ea0ebaf9ea87558abecdc1df6145dc5 files/digest-openmosix-sources-2.4.20-r6 133 diff --git a/sys-kernel/openmosix-sources/files/digest-openmosix-sources-2.4.20-r6 b/sys-kernel/openmosix-sources/files/digest-openmosix-sources-2.4.20-r7 index 4300571b7e2a..4300571b7e2a 100644 --- a/sys-kernel/openmosix-sources/files/digest-openmosix-sources-2.4.20-r6 +++ b/sys-kernel/openmosix-sources/files/digest-openmosix-sources-2.4.20-r7 diff --git a/sys-kernel/openmosix-sources/files/digest-openmosix-sources-2.4.21 b/sys-kernel/openmosix-sources/files/digest-openmosix-sources-2.4.21 deleted file mode 100644 index a520ef687ffa..000000000000 --- a/sys-kernel/openmosix-sources/files/digest-openmosix-sources-2.4.21 +++ /dev/null @@ -1,2 +0,0 @@ -MD5 f51e12efa18bb828cf57d9d4a81b2fb1 linux-2.4.21.tar.bz2 28533733 -MD5 c0f06cde9049b2e17fbc286532dbb2d4 openMosix-2.4.21-1.bz2 276962 diff --git a/sys-kernel/openmosix-sources/files/digest-openmosix-sources-2.4.21-r1 b/sys-kernel/openmosix-sources/files/digest-openmosix-sources-2.4.21-r2 index 6484c2c7bbcf..6484c2c7bbcf 100644 --- a/sys-kernel/openmosix-sources/files/digest-openmosix-sources-2.4.21-r1 +++ b/sys-kernel/openmosix-sources/files/digest-openmosix-sources-2.4.21-r2 diff --git a/sys-kernel/openmosix-sources/files/digest-openmosix-sources-2.4.22-r2 b/sys-kernel/openmosix-sources/files/digest-openmosix-sources-2.4.22-r3 index 25a77dcde136..25a77dcde136 100644 --- a/sys-kernel/openmosix-sources/files/digest-openmosix-sources-2.4.22-r2 +++ b/sys-kernel/openmosix-sources/files/digest-openmosix-sources-2.4.22-r3 diff --git a/sys-kernel/openmosix-sources/files/openmosix-sources-2.4.20.rtc_fix.patch b/sys-kernel/openmosix-sources/files/openmosix-sources-2.4.20.rtc_fix.patch new file mode 100644 index 000000000000..10e9c228d6d2 --- /dev/null +++ b/sys-kernel/openmosix-sources/files/openmosix-sources-2.4.20.rtc_fix.patch @@ -0,0 +1,156 @@ +diff -ur linux-2.4.20-wolk4.9s/arch/cris/drivers/ds1302.c linux-2.4.20-wolk4.9s.plasmaroo/arch/cris/drivers/ds1302.c +--- linux-2.4.20-wolk4.9s/arch/cris/drivers/ds1302.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/arch/cris/drivers/ds1302.c 2004-01-05 23:41:44.000000000 +0000 +@@ -315,6 +315,7 @@ + { + struct rtc_time rtc_tm; + ++ memset(&rtc_tm, 0, sizeof (struct rtc_time)); + get_rtc_time(&rtc_tm); + if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time))) + return -EFAULT; +diff -ur linux-2.4.20-wolk4.9s/arch/cris/drivers/pcf8563.c linux-2.4.20-wolk4.9s.plasmaroo/arch/cris/drivers/pcf8563.c +--- linux-2.4.20-wolk4.9s/arch/cris/drivers/pcf8563.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/arch/cris/drivers/pcf8563.c 2004-01-05 23:42:22.000000000 +0000 +@@ -174,6 +174,7 @@ + { + struct rtc_time tm; + ++ memset(&tm, 0, sizeof (struct rtc_time)); + get_rtc_time(&tm); + + if (copy_to_user((struct rtc_time *) arg, &tm, sizeof(struct rtc_time))) { +diff -ur linux-2.4.20-wolk4.9s/arch/m68k/bvme6000/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/arch/m68k/bvme6000/rtc.c +--- linux-2.4.20-wolk4.9s/arch/m68k/bvme6000/rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/arch/m68k/bvme6000/rtc.c 2004-01-05 23:43:15.000000000 +0000 +@@ -54,6 +54,7 @@ + /* Ensure clock and real-time-mode-register are accessible */ + msr = rtc->msr & 0xc0; + rtc->msr = 0x40; ++ memset(&wtime, 0, sizeof (struct rtc_time)); + do { + wtime.tm_sec = BCD2BIN(rtc->bcd_sec); + wtime.tm_min = BCD2BIN(rtc->bcd_min); +diff -ur linux-2.4.20-wolk4.9s/arch/m68k/mvme16x/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/arch/m68k/mvme16x/rtc.c +--- linux-2.4.20-wolk4.9s/arch/m68k/mvme16x/rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/arch/m68k/mvme16x/rtc.c 2004-01-05 23:44:02.000000000 +0000 +@@ -52,6 +52,7 @@ + cli(); + /* Ensure clock and real-time-mode-register are accessible */ + rtc->ctrl = RTC_READ; ++ memset(&wtime, 0, sizeof (struct rtc_time)); + wtime.tm_sec = BCD2BIN(rtc->bcd_sec); + wtime.tm_min = BCD2BIN(rtc->bcd_min); + wtime.tm_hour = BCD2BIN(rtc->bcd_hr); +diff -ur linux-2.4.20-wolk4.9s/arch/mips/sgi-ip27/ip27-rtc.c linux-2.4.20-wolk4.9s.plasmaroo/arch/mips/sgi-ip27/ip27-rtc.c +--- linux-2.4.20-wolk4.9s/arch/mips/sgi-ip27/ip27-rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/arch/mips/sgi-ip27/ip27-rtc.c 2004-01-05 23:48:34.000000000 +0000 +@@ -84,6 +84,7 @@ + switch (cmd) { + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + get_rtc_time(&wtime); + break; + } +diff -ur linux-2.4.20-wolk4.9s/arch/ppc64/kernel/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/arch/ppc64/kernel/rtc.c +--- linux-2.4.20-wolk4.9s/arch/ppc64/kernel/rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/arch/ppc64/kernel/rtc.c 2004-01-05 23:44:34.000000000 +0000 +@@ -96,6 +96,7 @@ + switch (cmd) { + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + ppc_md.get_rtc_time(&wtime); + break; + } +diff -ur linux-2.4.20-wolk4.9s/drivers/char/efirtc.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/char/efirtc.c +--- linux-2.4.20-wolk4.9s/drivers/char/efirtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/char/efirtc.c 2004-01-05 23:47:53.000000000 +0000 +@@ -118,6 +118,7 @@ + static void + convert_from_efi_time(efi_time_t *eft, struct rtc_time *wtime) + { ++ memset(wtime, 0, sizeof(struct rtc_time)); + wtime->tm_sec = eft->second; + wtime->tm_min = eft->minute; + wtime->tm_hour = eft->hour; +diff -ur linux-2.4.20-wolk4.9s/drivers/char/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/char/rtc.c +--- linux-2.4.20-wolk4.9s/drivers/char/rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/char/rtc.c 2004-01-05 23:52:43.000000000 +0000 +@@ -370,6 +370,7 @@ + * tm_min, and tm_sec values are filled in. + */ + ++ memset(&wtime, 0, sizeof(struct rtc_time)); + get_rtc_alm_time(&wtime); + break; + } +@@ -417,6 +418,7 @@ + } + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + get_rtc_time(&wtime); + break; + } +diff -ur linux-2.4.20-wolk4.9s/drivers/hil/hp_sdc_rtc.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/hil/hp_sdc_rtc.c +--- linux-2.4.20-wolk4.9s/drivers/hil/hp_sdc_rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/hil/hp_sdc_rtc.c 2004-01-05 23:53:36.000000000 +0000 +@@ -561,6 +561,7 @@ + } + case RTC_ALM_READ: /* Read the present alarm time */ + { ++ memset(&ttime, 0, sizeof(struct timeval)); + if (hp_sdc_rtc_read_mt(&ttime)) return -EFAULT; + break; + } +@@ -609,6 +610,7 @@ + } + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + if (hp_sdc_rtc_read_bbrtc(&wtime)) return -EFAULT; + break; + } +diff -ur linux-2.4.20-wolk4.9s/drivers/macintosh/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/macintosh/rtc.c +--- linux-2.4.20-wolk4.9s/drivers/macintosh/rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/macintosh/rtc.c 2004-01-05 23:54:15.000000000 +0000 +@@ -64,6 +64,7 @@ + case RTC_RD_TIME: + if (ppc_md.get_rtc_time) + { ++ memset(&rtc_tm, 0, sizeof(struct rtc_time)); + get_rtc_time(&rtc_tm); + + if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time))) +diff -ur linux-2.4.20-wolk4.9s/drivers/sbus/char/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/sbus/char/rtc.c +--- linux-2.4.20-wolk4.9s/drivers/sbus/char/rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/sbus/char/rtc.c 2004-01-05 23:54:43.000000000 +0000 +@@ -89,6 +89,7 @@ + switch (cmd) + { + case RTCGET: ++ memset(&rtc_tm, 0, sizeof(struct rtc_time)); + get_rtc_time(&rtc_tm); + + if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time))) +diff -ur linux-2.4.20-wolk4.9s/drivers/sgi/char/ds1286.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/sgi/char/ds1286.c +--- linux-2.4.20-wolk4.9s/drivers/sgi/char/ds1286.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/sgi/char/ds1286.c 2004-01-05 23:47:25.000000000 +0000 +@@ -174,6 +174,7 @@ + * tm_min, and tm_sec values are filled in. + */ + ++ memset(&wtime, 0, sizeof(struct rtc_time)); + ds1286_get_alm_time(&wtime); + break; + } +@@ -216,6 +217,7 @@ + } + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + ds1286_get_time(&wtime); + break; + } diff --git a/sys-kernel/openmosix-sources/files/openmosix-sources-2.4.22.rtc_fix.patch b/sys-kernel/openmosix-sources/files/openmosix-sources-2.4.22.rtc_fix.patch new file mode 100644 index 000000000000..76a663c6e89d --- /dev/null +++ b/sys-kernel/openmosix-sources/files/openmosix-sources-2.4.22.rtc_fix.patch @@ -0,0 +1,180 @@ +diff -urN linux-2.4.23/arch/cris/drivers/ds1302.c linux-2.4.24/arch/cris/drivers/ds1302.c +--- linux-2.4.23/arch/cris/drivers/ds1302.c 2003-08-25 04:44:39.000000000 -0700 ++++ linux-2.4.24/arch/cris/drivers/ds1302.c 2004-01-05 05:53:56.000000000 -0800 +@@ -346,6 +346,7 @@ + { + struct rtc_time rtc_tm; + ++ memset(&rtc_tm, 0, sizeof (struct rtc_time)); + get_rtc_time(&rtc_tm); + if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time))) + return -EFAULT; +diff -urN linux-2.4.23/arch/cris/drivers/pcf8563.c linux-2.4.24/arch/cris/drivers/pcf8563.c +--- linux-2.4.23/arch/cris/drivers/pcf8563.c 2003-08-25 04:44:39.000000000 -0700 ++++ linux-2.4.24/arch/cris/drivers/pcf8563.c 2004-01-05 05:53:56.000000000 -0800 +@@ -220,6 +220,7 @@ + { + struct rtc_time tm; + ++ memset(&tm, 0, sizeof (struct rtc_time)); + get_rtc_time(&tm); + + if (copy_to_user((struct rtc_time *) arg, &tm, sizeof tm)) { +diff -urN linux-2.4.23/arch/m68k/bvme6000/rtc.c linux-2.4.24/arch/m68k/bvme6000/rtc.c +--- linux-2.4.23/arch/m68k/bvme6000/rtc.c 2003-06-13 07:51:31.000000000 -0700 ++++ linux-2.4.24/arch/m68k/bvme6000/rtc.c 2004-01-05 05:53:56.000000000 -0800 +@@ -54,6 +54,7 @@ + /* Ensure clock and real-time-mode-register are accessible */ + msr = rtc->msr & 0xc0; + rtc->msr = 0x40; ++ memset(&wtime, 0, sizeof(struct rtc_time)); + do { + wtime.tm_sec = BCD2BIN(rtc->bcd_sec); + wtime.tm_min = BCD2BIN(rtc->bcd_min); +diff -urN linux-2.4.23/arch/m68k/mvme16x/rtc.c linux-2.4.24/arch/m68k/mvme16x/rtc.c +--- linux-2.4.23/arch/m68k/mvme16x/rtc.c 2003-06-13 07:51:31.000000000 -0700 ++++ linux-2.4.24/arch/m68k/mvme16x/rtc.c 2004-01-05 05:53:56.000000000 -0800 +@@ -52,6 +52,7 @@ + cli(); + /* Ensure clock and real-time-mode-register are accessible */ + rtc->ctrl = RTC_READ; ++ memset(&wtime, 0, sizeof(struct rtc_time)); + wtime.tm_sec = BCD2BIN(rtc->bcd_sec); + wtime.tm_min = BCD2BIN(rtc->bcd_min); + wtime.tm_hour = BCD2BIN(rtc->bcd_hr); +diff -urN linux-2.4.23/arch/ppc64/kernel/rtc.c linux-2.4.24/arch/ppc64/kernel/rtc.c +--- linux-2.4.23/arch/ppc64/kernel/rtc.c 2003-06-13 07:51:32.000000000 -0700 ++++ linux-2.4.24/arch/ppc64/kernel/rtc.c 2004-01-05 05:53:56.000000000 -0800 +@@ -96,6 +96,7 @@ + switch (cmd) { + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + ppc_md.get_rtc_time(&wtime); + break; + } +diff -urN linux-2.4.23/drivers/acorn/char/i2c.c linux-2.4.24/drivers/acorn/char/i2c.c +--- linux-2.4.23/drivers/acorn/char/i2c.c 2003-08-25 04:44:40.000000000 -0700 ++++ linux-2.4.24/drivers/acorn/char/i2c.c 2004-01-05 05:53:56.000000000 -0800 +@@ -166,6 +166,7 @@ + break; + + case RTC_RD_TIME: ++ memset(&rtctm, 0, sizeof(struct rtc_time)); + get_rtc_time(&rtc_raw, &year); + rtctm.tm_sec = rtc_raw.secs; + rtctm.tm_min = rtc_raw.mins; +diff -urN linux-2.4.23/drivers/char/ds1286.c linux-2.4.24/drivers/char/ds1286.c +--- linux-2.4.23/drivers/char/ds1286.c 2003-08-25 04:44:41.000000000 -0700 ++++ linux-2.4.24/drivers/char/ds1286.c 2004-01-05 05:53:56.000000000 -0800 +@@ -173,7 +173,7 @@ + * means "don't care" or "match all". Only the tm_hour, + * tm_min, and tm_sec values are filled in. + */ +- ++ memset(&wtime, 0, sizeof(struct rtc_time)); + ds1286_get_alm_time(&wtime); + break; + } +@@ -216,6 +216,7 @@ + } + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + ds1286_get_time(&wtime); + break; + } +diff -urN linux-2.4.23/drivers/char/efirtc.c linux-2.4.24/drivers/char/efirtc.c +--- linux-2.4.23/drivers/char/efirtc.c 2003-06-13 07:51:32.000000000 -0700 ++++ linux-2.4.24/drivers/char/efirtc.c 2004-01-05 05:53:56.000000000 -0800 +@@ -118,6 +118,7 @@ + static void + convert_from_efi_time(efi_time_t *eft, struct rtc_time *wtime) + { ++ memset(wtime, 0, sizeof(struct rtc_time)); + wtime->tm_sec = eft->second; + wtime->tm_min = eft->minute; + wtime->tm_hour = eft->hour; +diff -urN linux-2.4.23/drivers/char/ip27-rtc.c linux-2.4.24/drivers/char/ip27-rtc.c +--- linux-2.4.23/drivers/char/ip27-rtc.c 2003-08-25 04:44:41.000000000 -0700 ++++ linux-2.4.24/drivers/char/ip27-rtc.c 2004-01-05 05:53:56.000000000 -0800 +@@ -83,6 +83,7 @@ + switch (cmd) { + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + get_rtc_time(&wtime); + break; + } +diff -urN linux-2.4.23/drivers/char/mips_rtc.c linux-2.4.24/drivers/char/mips_rtc.c +--- linux-2.4.23/drivers/char/mips_rtc.c 2003-08-25 04:44:41.000000000 -0700 ++++ linux-2.4.24/drivers/char/mips_rtc.c 2004-01-05 05:53:56.000000000 -0800 +@@ -82,6 +82,7 @@ + + switch (cmd) { + case RTC_RD_TIME: /* Read the time/date from RTC */ ++ memset(&rtc_tm, 0, sizeof(struct rtc_time)); + curr_time = rtc_get_time(); + to_tm(curr_time, &rtc_tm); + rtc_tm.tm_year -= 1900; +diff -urN linux-2.4.23/drivers/char/rtc.c linux-2.4.24/drivers/char/rtc.c +--- linux-2.4.23/drivers/char/rtc.c 2003-11-28 10:26:20.000000000 -0800 ++++ linux-2.4.24/drivers/char/rtc.c 2004-01-05 05:53:56.000000000 -0800 +@@ -362,7 +362,7 @@ + * means "don't care" or "match all". Only the tm_hour, + * tm_min, and tm_sec values are filled in. + */ +- ++ memset(&wtime, 0, sizeof(struct rtc_time)); + get_rtc_alm_time(&wtime); + break; + } +@@ -406,6 +406,7 @@ + } + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + get_rtc_time(&wtime); + break; + } +diff -urN linux-2.4.23/drivers/hil/hp_sdc_rtc.c linux-2.4.24/drivers/hil/hp_sdc_rtc.c +--- linux-2.4.23/drivers/hil/hp_sdc_rtc.c 2003-06-13 07:51:33.000000000 -0700 ++++ linux-2.4.24/drivers/hil/hp_sdc_rtc.c 2004-01-05 05:53:56.000000000 -0800 +@@ -561,6 +561,7 @@ + } + case RTC_ALM_READ: /* Read the present alarm time */ + { ++ memset(&ttime, 0, sizeof(struct timeval)); + if (hp_sdc_rtc_read_mt(&ttime)) return -EFAULT; + break; + } +@@ -609,6 +610,7 @@ + } + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + if (hp_sdc_rtc_read_bbrtc(&wtime)) return -EFAULT; + break; + } +diff -urN linux-2.4.23/drivers/macintosh/rtc.c linux-2.4.24/drivers/macintosh/rtc.c +--- linux-2.4.23/drivers/macintosh/rtc.c 2002-02-25 11:37:58.000000000 -0800 ++++ linux-2.4.24/drivers/macintosh/rtc.c 2004-01-05 05:53:56.000000000 -0800 +@@ -64,6 +64,7 @@ + case RTC_RD_TIME: + if (ppc_md.get_rtc_time) + { ++ memset(&rtc_tm, 0, sizeof(struct rtc_time)); + get_rtc_time(&rtc_tm); + + if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time))) +diff -urN linux-2.4.23/drivers/sbus/char/rtc.c linux-2.4.24/drivers/sbus/char/rtc.c +--- linux-2.4.23/drivers/sbus/char/rtc.c 2001-10-10 23:42:47.000000000 -0700 ++++ linux-2.4.24/drivers/sbus/char/rtc.c 2004-01-05 05:53:56.000000000 -0800 +@@ -89,6 +89,7 @@ + switch (cmd) + { + case RTCGET: ++ memset(&rtc_tm, 0, sizeof(struct rtc_time)); + get_rtc_time(&rtc_tm); + + if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time))) diff --git a/sys-kernel/openmosix-sources/files/openmosix-sources.CAN-2003-0985.patch b/sys-kernel/openmosix-sources/files/openmosix-sources.CAN-2003-0985.patch new file mode 100644 index 000000000000..bacef69f02f8 --- /dev/null +++ b/sys-kernel/openmosix-sources/files/openmosix-sources.CAN-2003-0985.patch @@ -0,0 +1,13 @@ +--- linux/mm/mremap.c.orig 2004-01-05 17:01:21.382104120 +0000 ++++ linux/mm/mremap.c 2004-01-05 17:15:25.689749848 +0000 +@@ -315,6 +315,10 @@ + old_len = PAGE_ALIGN(old_len); + new_len = PAGE_ALIGN(new_len); + ++ /* Don't allow the degenerate cases */ ++ if (!(old_len | new_len)) ++ goto out; ++ + /* new_addr is only valid if MREMAP_FIXED is specified */ + if (flags & MREMAP_FIXED) { + if (new_addr & ~PAGE_MASK) diff --git a/sys-kernel/openmosix-sources/openmosix-sources-2.4.20-r6.ebuild b/sys-kernel/openmosix-sources/openmosix-sources-2.4.20-r7.ebuild index 4c15d98832bc..f29989ff8ae2 100644 --- a/sys-kernel/openmosix-sources/openmosix-sources-2.4.20-r6.ebuild +++ b/sys-kernel/openmosix-sources/openmosix-sources-2.4.20-r7.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. +# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/openmosix-sources/openmosix-sources-2.4.20-r6.ebuild,v 1.4 2003/12/01 22:58:29 iggy Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/openmosix-sources/openmosix-sources-2.4.20-r7.ebuild,v 1.1 2004/01/06 22:42:38 plasmaroo Exp $ #OKV=original kernel version, KV=patched kernel version. They can be the same. #we use this next variable to avoid duplicating stuff on cvs @@ -42,7 +42,9 @@ src_unpack() { cd ${S} cat ${DISTDIR}/openMosix-2.4.20-3.gz | gzip -d | patch -p1 || die - epatch ${FILESDIR}/do_brk_fix.patch || die "failed to patch for do_brk vuln" + epatch ${FILESDIR}/do_brk_fix.patch || die "Failed to patch do_brk() vulnerability!" + epatch ${FILESDIR}/${PN}.CAN-2003-0985.patch || die "Failed to patch mremap() vulnerability!" + epatch ${FILESDIR}/${P}.rtc_fix.patch || die "Failed to patch RTC vulnerabilities!" # Gentoo Linux uses /boot, so fix 'make install' to work properly cd ${S} diff --git a/sys-kernel/openmosix-sources/openmosix-sources-2.4.21-r1.ebuild b/sys-kernel/openmosix-sources/openmosix-sources-2.4.21-r2.ebuild index 8624cfc2b2e0..0412b4216016 100644 --- a/sys-kernel/openmosix-sources/openmosix-sources-2.4.21-r1.ebuild +++ b/sys-kernel/openmosix-sources/openmosix-sources-2.4.21-r2.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. +# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/openmosix-sources/openmosix-sources-2.4.21-r1.ebuild,v 1.1 2003/12/27 11:20:14 tantive Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/openmosix-sources/openmosix-sources-2.4.21-r2.ebuild,v 1.1 2004/01/06 22:42:38 plasmaroo Exp $ #OKV=original kernel version, KV=patched kernel version. They can be the same. #we use this next variable to avoid duplicating stuff on cvs @@ -44,7 +44,9 @@ src_unpack() { cd ${S} cat ${DISTDIR}/openMosix-2.4.21-1.bz2 | bzip2 -d | patch -p1 || die - epatch ${FILESDIR}/do_brk_fix.patch || die "failed to patch for do_brk vuln" + epatch ${FILESDIR}/do_brk_fix.patch || die "Failed to patch do_brk() vulnerability!" + epatch ${FILESDIR}/${PN}.CAN-2003-0985.patch || die "Failed to patch mremap() vulnerability!" + epatch ${FILESDIR}/${PN}-2.4.20.rtc_fix.patch || die "Failed to patch RTC vulnerabilities!" # Gentoo Linux uses /boot, so fix 'make install' to work properly cd ${S} diff --git a/sys-kernel/openmosix-sources/openmosix-sources-2.4.21.ebuild b/sys-kernel/openmosix-sources/openmosix-sources-2.4.21.ebuild deleted file mode 100644 index 8825a4b0f8c0..000000000000 --- a/sys-kernel/openmosix-sources/openmosix-sources-2.4.21.ebuild +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/openmosix-sources/openmosix-sources-2.4.21.ebuild,v 1.4 2003/12/01 22:58:29 iggy Exp $ -#OKV=original kernel version, KV=patched kernel version. They can be the same. - -#we use this next variable to avoid duplicating stuff on cvs -GFILESDIR=${PORTDIR}/sys-kernel/linux-sources/files -OKV=2.4.21 -[ "${PR}" == "r0" ] && KV=${OKV}-openmosix || KV=${OKV}-openmosix-${PR} -EXTRAVERSION="`echo ${KV}|sed -e 's:[0-9]\+\.[0-9]\+\.[0-9]\+\(.*\):\1:'`" -S=${WORKDIR}/linux-${KV} -ETYPE="sources" - -# What's in this kernel? - -# INCLUDED: -# 2.4.21, plus: -# 2.4.21 openmosix-2.4.21-1 - -DESCRIPTION="Full sources for the Gentoo openMosix Linux kernel" -SRC_URI="http://www.kernel.org/pub/linux/kernel/v2.4/linux-${OKV}.tar.bz2 mirror://sourceforge/openmosix/openMosix-2.4.21-1.bz2" -PROVIDE="virtual/linux-sources" -HOMEPAGE="http://www.kernel.org/ http://www.gentoo.org/ http://www.openmosix.org/" -LICENSE="GPL-2" -SLOT="${KV}" -KEYWORDS="-* x86" - - -if [ $ETYPE = "sources" ] && [ -z "`use build`" ] -then - #console-tools is needed to solve the loadkeys fiasco; binutils version needed to avoid Athlon/PIII/SSE assembler bugs. - DEPEND=">=sys-devel/binutils-2.11.90.0.31" - RDEPEND=">=sys-libs/ncurses-5.2 dev-lang/perl virtual/modutils sys-devel/make" -fi - -[ -z "$LINUX_HOSTCFLAGS" ] && LINUX_HOSTCFLAGS="-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I${S}/include" - -src_unpack() { - cd ${WORKDIR} - unpack linux-${OKV}.tar.bz2 - mv linux-${OKV} linux-${KV} || die - cd ${S} - cat ${DISTDIR}/openMosix-2.4.21-1.bz2 | bzip2 -d | patch -p1 || die - - epatch ${FILESDIR}/do_brk_fix.patch || die "failed to patch for do_brk vuln" - - # Gentoo Linux uses /boot, so fix 'make install' to work properly - cd ${S} - mv Makefile Makefile.orig - sed -e 's:#export\tINSTALL_PATH:export\tINSTALL_PATH:' \ - -e "s:^\(EXTRAVERSION =\).*:\1 ${EXTRAVERSION}:" \ - Makefile.orig > Makefile || die # test, remove me if Makefile ok - rm Makefile.orig -# rm Makefile~ - - #sometimes we have icky kernel symbols; this seems to get rid of them - make mrproper || die - - #this file is required for other things to build properly, so we autogenerate it - make include/linux/version.h || die - - #fix silly permissions in tarball - cd ${WORKDIR} - chown -R root:root * - chmod -R a+r-w+X,u+w * -} - -src_compile() { - if [ "$ETYPE" = "headers" ] - then - yes "" | make oldconfig - echo "Ignore any errors from the yes command above." - fi -} - -src_install() { - if [ "$ETYPE" = "sources" ] - then - dodir /usr/src - echo ">>> Copying sources..." - mv ${WORKDIR}/* ${D}/usr/src - else - #linux-headers - dodir /usr/include/linux - cp -ax ${S}/include/linux/* ${D}/usr/include/linux - rm -rf ${D}/usr/include/linux/modules - dodir /usr/include/asm - cp -ax ${S}/include/asm-i386/* ${D}/usr/include/asm - fi -} - -pkg_preinst() { - if [ "$ETYPE" = "headers" ] - then - [ -L ${ROOT}usr/include/linux ] && rm ${ROOT}usr/include/linux - [ -L ${ROOT}usr/include/asm ] && rm ${ROOT}usr/include/asm - true - fi -} - -pkg_postinst() { - [ "$ETYPE" = "headers" ] && return - if [ ! -e ${ROOT}usr/src/linux ] - then - rm -f ${ROOT}usr/src/linux - ln -sf linux-${KV} ${ROOT}/usr/src/linux - fi -} diff --git a/sys-kernel/openmosix-sources/openmosix-sources-2.4.22-r2.ebuild b/sys-kernel/openmosix-sources/openmosix-sources-2.4.22-r3.ebuild index fdc85325f855..64d6387c74d4 100644 --- a/sys-kernel/openmosix-sources/openmosix-sources-2.4.22-r2.ebuild +++ b/sys-kernel/openmosix-sources/openmosix-sources-2.4.22-r3.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. +# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/openmosix-sources/openmosix-sources-2.4.22-r2.ebuild,v 1.2 2003/12/05 16:20:00 tantive Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/openmosix-sources/openmosix-sources-2.4.22-r3.ebuild,v 1.1 2004/01/06 22:42:38 plasmaroo Exp $ #OKV=original kernel version, KV=patched kernel version. They can be the same. ETYPE="sources" @@ -28,10 +28,16 @@ SLOT="${KV}" KEYWORDS="-* x86" src_unpack() { + unpack linux-${OKV}.tar.bz2 mv linux-${OKV} linux-${KV} || die cd linux-${KV} bzcat ${DISTDIR}/openMosix-2.4.22-2.bz2|patch -p1 || die "-openmosix patch failed" - epatch ${FILESDIR}/do_brk_fix.patch || die "failed to patch for do_brk vuln" + + epatch ${FILESDIR}/do_brk_fix.patch || die "Failed to patch do_brk() vulnerability!" + epatch ${FILESDIR}/${PN}.CAN-2003-0985.patch || die "Failed to patch mremap() vulnerability!" + epatch ${FILESDIR}/${P}.rtc_fix.patch || die "Failed to patch RTC vulnerabilities!" + kernel_universal_unpack + } |