From 50871f25e2338243c899157647a51f18da010b58 Mon Sep 17 00:00:00 2001 From: Guillaume Destuynder Date: Tue, 10 Aug 2004 09:37:58 +0000 Subject: Fixes CAN 0685 and cmdline, bug #59769, #59905 --- sys-kernel/rsbac-sources/ChangeLog | 9 ++- sys-kernel/rsbac-sources/Manifest | 4 ++ .../rsbac-sources/files/2.4.26-CAN-2004-685.patch | 83 ++++++++++++++++++++++ .../rsbac-sources/files/2.4.26-cmdline-race.patch | 11 +++ .../files/digest-rsbac-sources-2.4.26-r4 | 4 -- .../files/digest-rsbac-sources-2.4.26-r5 | 4 ++ .../rsbac-sources/rsbac-sources-2.4.26-r4.ebuild | 45 ------------ .../rsbac-sources/rsbac-sources-2.4.26-r5.ebuild | 46 ++++++++++++ 8 files changed, 156 insertions(+), 50 deletions(-) create mode 100644 sys-kernel/rsbac-sources/files/2.4.26-CAN-2004-685.patch create mode 100644 sys-kernel/rsbac-sources/files/2.4.26-cmdline-race.patch delete mode 100644 sys-kernel/rsbac-sources/files/digest-rsbac-sources-2.4.26-r4 create mode 100644 sys-kernel/rsbac-sources/files/digest-rsbac-sources-2.4.26-r5 delete mode 100644 sys-kernel/rsbac-sources/rsbac-sources-2.4.26-r4.ebuild create mode 100644 sys-kernel/rsbac-sources/rsbac-sources-2.4.26-r5.ebuild (limited to 'sys-kernel/rsbac-sources') diff --git a/sys-kernel/rsbac-sources/ChangeLog b/sys-kernel/rsbac-sources/ChangeLog index fd48990fe274..383bcbb7e142 100644 --- a/sys-kernel/rsbac-sources/ChangeLog +++ b/sys-kernel/rsbac-sources/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-kernel/rsbac-sources # Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/rsbac-sources/ChangeLog,v 1.14 2004/08/05 01:20:22 kang Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/rsbac-sources/ChangeLog,v 1.15 2004/08/10 09:37:58 kang Exp $ + +*rsbac-sources-2.4.26-r5 (10 Aug 2004) + + 10 Aug 2004; Guillaume Destuynder + +files/2.4.26-CAN-2004-685.patch, +files/2.4.26-cmdline-race.patch, + -rsbac-sources-2.4.26-r4.ebuild, +rsbac-sources-2.4.26-r5.ebuild: + Fixes CAN 0685 and cmdline, bug #59769, #59905 *rsbac-sources-2.4.26-r4 (05 Aug 2004) diff --git a/sys-kernel/rsbac-sources/Manifest b/sys-kernel/rsbac-sources/Manifest index 4ef3ca49a34d..f0e8d95a4f08 100644 --- a/sys-kernel/rsbac-sources/Manifest +++ b/sys-kernel/rsbac-sources/Manifest @@ -1,8 +1,12 @@ MD5 fee9abc7797fef753c42454679bae9a7 metadata.xml 456 MD5 76b03044a6a84a703538f8dbc2afba1f rsbac-sources-2.4.26-r4.ebuild 1553 MD5 0aa1192077371672f100407df6b18b80 ChangeLog 1576 +MD5 ec49315ff08ba373fb2d189abfc9f2ef rsbac-sources-2.4.26-r5.ebuild 1581 MD5 dc18e982f8149588a291956481885a8c files/rsbac-sources-2.4.CAN-2004-0495.patch 17549 MD5 0f66013f643c79c97fda489618a4e2fd files/rsbac-sources-2.4.CAN-2004-0535.patch 476 MD5 a869ab037c7e264df5f8e899864f08e9 files/rsbac-sources-v1.2.3-3.patch 557 MD5 3bdf00d5f80fe9dfbfe8220e076cd04c files/rsbac-sources-CAN-2004-0497.patch 707 MD5 ed937dbb278198dc190e96cd3e8e4f80 files/digest-rsbac-sources-2.4.26-r4 283 +MD5 d1ccc2047be533c992f67270a150a210 files/2.4.26-cmdline-race.patch 388 +MD5 60d25ff310fc6abfdce39ec9e47345af files/2.4.26-CAN-2004-685.patch 2809 +MD5 ed937dbb278198dc190e96cd3e8e4f80 files/digest-rsbac-sources-2.4.26-r5 283 diff --git a/sys-kernel/rsbac-sources/files/2.4.26-CAN-2004-685.patch b/sys-kernel/rsbac-sources/files/2.4.26-CAN-2004-685.patch new file mode 100644 index 000000000000..d1be834cc8a5 --- /dev/null +++ b/sys-kernel/rsbac-sources/files/2.4.26-CAN-2004-685.patch @@ -0,0 +1,83 @@ +# This is a BitKeeper generated diff -Nru style patch. +# +# ChangeSet +# 2004/07/26 19:14:16-03:00 mjc@redhat.com +# [PATCH] USB: more sparse fixes +# +# Back in October 2003 Arnaldo commited some fixes prior to 2.6 for some leaking info to userspace in the +# usb drivers: +# http://linux.bkbits.net:8080/linux-2.6/cset@3f986b35LyBKc-OxB8G6k22oOjgYTQ +# +# The corresponding changes have not been commited to 2.4, or included in +# the previous sparse fixes. +# +# drivers/usb/audio.c +# 2004/07/15 08:46:52-03:00 mjc@redhat.com +4 -0 +# USB: more sparse fixes +# +# drivers/usb/brlvger.c +# 2004/07/15 08:47:27-03:00 mjc@redhat.com +1 -0 +# USB: more sparse fixes +# +# drivers/usb/serial/io_edgeport.c +# 2004/07/15 08:48:06-03:00 mjc@redhat.com +1 -0 +# USB: more sparse fixes +# +# drivers/usb/vicam.c +# 2004/07/15 08:47:13-03:00 mjc@redhat.com +1 -0 +# USB: more sparse fixes +# +diff -Nru a/drivers/usb/audio.c b/drivers/usb/audio.c +--- a/drivers/usb/audio.c 2004-08-08 07:41:30 -07:00 ++++ b/drivers/usb/audio.c 2004-08-08 07:41:30 -07:00 +@@ -2141,6 +2141,8 @@ + + if (cmd == SOUND_MIXER_INFO) { + mixer_info info; ++ ++ memset(&info, 0, sizeof(info)); + strncpy(info.id, "USB_AUDIO", sizeof(info.id)); + strncpy(info.name, "USB Audio Class Driver", sizeof(info.name)); + info.modify_counter = ms->modcnt; +@@ -2150,6 +2152,8 @@ + } + if (cmd == SOUND_OLD_MIXER_INFO) { + _old_mixer_info info; ++ ++ memset(&info, 0, sizeof(info)); + strncpy(info.id, "USB_AUDIO", sizeof(info.id)); + strncpy(info.name, "USB Audio Class Driver", sizeof(info.name)); + if (copy_to_user((void *)arg, &info, sizeof(info))) +diff -Nru a/drivers/usb/brlvger.c b/drivers/usb/brlvger.c +--- a/drivers/usb/brlvger.c 2004-08-08 07:41:30 -07:00 ++++ b/drivers/usb/brlvger.c 2004-08-08 07:41:30 -07:00 +@@ -743,6 +743,7 @@ + case BRLVGER_GET_INFO: { + struct brlvger_info vi; + ++ memset(&vi, 0, sizeof(vi)); + strncpy(vi.driver_version, DRIVER_VERSION, + sizeof(vi.driver_version)); + vi.driver_version[sizeof(vi.driver_version)-1] = 0; +diff -Nru a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c +--- a/drivers/usb/serial/io_edgeport.c 2004-08-08 07:41:30 -07:00 ++++ b/drivers/usb/serial/io_edgeport.c 2004-08-08 07:41:30 -07:00 +@@ -1913,6 +1913,7 @@ + + case TIOCGICOUNT: + cnow = edge_port->icount; ++ memset(&icount, 0, sizeof(icount)); + icount.cts = cnow.cts; + icount.dsr = cnow.dsr; + icount.rng = cnow.rng; +diff -Nru a/drivers/usb/vicam.c b/drivers/usb/vicam.c +--- a/drivers/usb/vicam.c 2004-08-08 07:41:30 -07:00 ++++ b/drivers/usb/vicam.c 2004-08-08 07:41:30 -07:00 +@@ -481,6 +481,7 @@ + struct video_capability b; + + DBG("VIDIOCGCAP\n"); ++ memset(&b, 0, sizeof(b)); + strcpy(b.name, "ViCam-based Camera"); + b.type = VID_TYPE_CAPTURE; + b.channels = 1; diff --git a/sys-kernel/rsbac-sources/files/2.4.26-cmdline-race.patch b/sys-kernel/rsbac-sources/files/2.4.26-cmdline-race.patch new file mode 100644 index 000000000000..5f26f7f388f6 --- /dev/null +++ b/sys-kernel/rsbac-sources/files/2.4.26-cmdline-race.patch @@ -0,0 +1,11 @@ +--- linux-2.4/fs/proc/base.c 2004-04-15 07:09:32.000000000 +0100 ++++ linux-2.4/fs/proc/base.c.plasmaroo 2004-08-09 23:30:43.869195800 +0100 +@@ -187,7 +187,7 @@ static int proc_pid_cmdline(struct task_ + if (mm) + atomic_inc(&mm->mm_users); + task_unlock(task); +- if (mm) { ++ if (mm && mm->arg_end) { + int len = mm->arg_end - mm->arg_start; + if (len > PAGE_SIZE) + len = PAGE_SIZE; diff --git a/sys-kernel/rsbac-sources/files/digest-rsbac-sources-2.4.26-r4 b/sys-kernel/rsbac-sources/files/digest-rsbac-sources-2.4.26-r4 deleted file mode 100644 index 24173616eac3..000000000000 --- a/sys-kernel/rsbac-sources/files/digest-rsbac-sources-2.4.26-r4 +++ /dev/null @@ -1,4 +0,0 @@ -MD5 88d7aefa03c92739cb70298a0b486e2c linux-2.4.26.tar.bz2 30772389 -MD5 f3759250e9c4bb5ccb773174fafe0ba7 rsbac-v1.2.3.tar.bz2 489127 -MD5 26604fdd9cc696510c65b5db124c7527 rsbac-patches-2.4-26.7.tar.bz2 294589 -MD5 8f8f2412aacf9a01b5549bf2a9a3bff8 linux-2.4.26-CAN-2004-0415.patch 90145 diff --git a/sys-kernel/rsbac-sources/files/digest-rsbac-sources-2.4.26-r5 b/sys-kernel/rsbac-sources/files/digest-rsbac-sources-2.4.26-r5 new file mode 100644 index 000000000000..24173616eac3 --- /dev/null +++ b/sys-kernel/rsbac-sources/files/digest-rsbac-sources-2.4.26-r5 @@ -0,0 +1,4 @@ +MD5 88d7aefa03c92739cb70298a0b486e2c linux-2.4.26.tar.bz2 30772389 +MD5 f3759250e9c4bb5ccb773174fafe0ba7 rsbac-v1.2.3.tar.bz2 489127 +MD5 26604fdd9cc696510c65b5db124c7527 rsbac-patches-2.4-26.7.tar.bz2 294589 +MD5 8f8f2412aacf9a01b5549bf2a9a3bff8 linux-2.4.26-CAN-2004-0415.patch 90145 diff --git a/sys-kernel/rsbac-sources/rsbac-sources-2.4.26-r4.ebuild b/sys-kernel/rsbac-sources/rsbac-sources-2.4.26-r4.ebuild deleted file mode 100644 index ca1425b65798..000000000000 --- a/sys-kernel/rsbac-sources/rsbac-sources-2.4.26-r4.ebuild +++ /dev/null @@ -1,45 +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/rsbac-sources/rsbac-sources-2.4.26-r4.ebuild,v 1.1 2004/08/05 01:20:22 kang Exp $ - -IUSE="" -ETYPE="sources" -inherit kernel-2 -detect_version - -# rsbac -RSBACV=1.2.3 -RSBAC_SRC="http://rsbac.org/download/code/v${RSBACV}/rsbac-v${RSBACV}.tar.bz2" -CAN_SRC="http://dev.gentoo.org/~plasmaroo/patches/kernel/misc/security/linux-2.4.26-CAN-2004-0415.patch" - -# rsbac kernel patches -RGPV=26.7 -RGPV_SRC="mirror://rsbac-patches-${KV_MAJOR}.${KV_MINOR}-${RGPV}.tar.bz2 http://dev.gentoo.org/~zhware/rsbac/v${RSBACV}/rsbac-patches-${KV_MAJOR}.${KV_MINOR}-${RGPV}.tar.bz2" - -UNIPATCH_STRICTORDER="yes" -UNIPATCH_LIST=" ${FILESDIR}/${PN}-2.4.CAN-2004-0495.patch - ${FILESDIR}/${PN}-2.4.CAN-2004-0535.patch - ${FILESDIR}/${PN}-CAN-2004-0497.patch - ${DISTDIR}/linux-2.4.26-CAN-2004-0415.patch - ${DISTDIR}/rsbac-patches-${KV_MAJOR}.${KV_MINOR}-${RGPV}.tar.bz2 - ${FILESDIR}/${PN}-v1.2.3-3.patch" -UNIPATCH_DOCS="${WORKDIR}/patches/rsbac-patches-${KV_MAJOR}.${KV_MINOR}-${RGPV}/0000_README" - -HOMEPAGE="http://hardened.gentoo.org/rsbac" -DESCRIPTION="RSBAC hardened sources for the ${KV_MAJOR}.${KV_MINOR} kernel tree" - -SRC_URI="${KERNEL_URI} ${RSBAC_SRC} ${RGPV_SRC} ${CAN_SRC}" -KEYWORDS="x86" - - -src_unpack() { - universal_unpack - cd ${WORKDIR}/linux-${KV}; unpack rsbac-v${RSBACV}.tar.bz2 - unipatch "${UNIPATCH_LIST}" - [ -z "${K_NOSETEXTRAVERSION}" ] && unpack_set_extraversion - unpack_2_4 -} - -pkg_postinst() { - postinst_sources -} diff --git a/sys-kernel/rsbac-sources/rsbac-sources-2.4.26-r5.ebuild b/sys-kernel/rsbac-sources/rsbac-sources-2.4.26-r5.ebuild new file mode 100644 index 000000000000..66e63c241d1f --- /dev/null +++ b/sys-kernel/rsbac-sources/rsbac-sources-2.4.26-r5.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/rsbac-sources/rsbac-sources-2.4.26-r5.ebuild,v 1.1 2004/08/10 09:37:58 kang Exp $ + +IUSE="" +ETYPE="sources" +inherit kernel-2 +detect_version + +# rsbac +RSBACV=1.2.3 +RSBAC_SRC="http://rsbac.org/download/code/v${RSBACV}/rsbac-v${RSBACV}.tar.bz2" +CAN_SRC="http://dev.gentoo.org/~plasmaroo/patches/kernel/misc/security/linux-2.4.26-CAN-2004-0415.patch" + +# rsbac kernel patches +RGPV=26.7 +RGPV_SRC="mirror://rsbac-patches-${KV_MAJOR}.${KV_MINOR}-${RGPV}.tar.bz2 http://dev.gentoo.org/~zhware/rsbac/v${RSBACV}/rsbac-patches-${KV_MAJOR}.${KV_MINOR}-${RGPV}.tar.bz2" + +UNIPATCH_STRICTORDER="yes" +UNIPATCH_LIST=" ${FILESDIR}/${PN}-2.4.CAN-2004-0495.patch + ${FILESDIR}/${PN}-2.4.CAN-2004-0535.patch + ${FILESDIR}/${PN}-CAN-2004-0497.patch + ${FILESDIR}/${OKV}-*.patch + ${DISTDIR}/linux-2.4.26-CAN-2004-0415.patch + ${DISTDIR}/rsbac-patches-${KV_MAJOR}.${KV_MINOR}-${RGPV}.tar.bz2 + ${FILESDIR}/${PN}-v1.2.3-3.patch" +UNIPATCH_DOCS="${WORKDIR}/patches/rsbac-patches-${KV_MAJOR}.${KV_MINOR}-${RGPV}/0000_README" + +HOMEPAGE="http://hardened.gentoo.org/rsbac" +DESCRIPTION="RSBAC hardened sources for the ${KV_MAJOR}.${KV_MINOR} kernel tree" + +SRC_URI="${KERNEL_URI} ${RSBAC_SRC} ${RGPV_SRC} ${CAN_SRC}" +KEYWORDS="x86" + + +src_unpack() { + universal_unpack + cd ${WORKDIR}/linux-${KV}; unpack rsbac-v${RSBACV}.tar.bz2 + unipatch "${UNIPATCH_LIST}" + [ -z "${K_NOSETEXTRAVERSION}" ] && unpack_set_extraversion + unpack_2_4 +} + +pkg_postinst() { + postinst_sources +} -- cgit v1.2.3-65-gdbad