summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Martin <gmsoft@gentoo.org>2004-08-09 23:24:56 +0000
committerGuy Martin <gmsoft@gentoo.org>2004-08-09 23:24:56 +0000
commit47bf75af4c6f6c45f23ad0a5160a99b170d3e09a (patch)
tree0055635f0deafccea24f3d4b2d8b79eebb791065 /sys-kernel/hppa-sources
parentVersion bumped. Bug 59627 (Manifest recommit) (diff)
downloadgentoo-2-47bf75af4c6f6c45f23ad0a5160a99b170d3e09a.tar.gz
gentoo-2-47bf75af4c6f6c45f23ad0a5160a99b170d3e09a.tar.bz2
gentoo-2-47bf75af4c6f6c45f23ad0a5160a99b170d3e09a.zip
Fixed race condition in /proc/<pid>/cmdline (#59905).
Diffstat (limited to 'sys-kernel/hppa-sources')
-rw-r--r--sys-kernel/hppa-sources/ChangeLog6
-rw-r--r--sys-kernel/hppa-sources/files/security-proc-cmdline.patch24
-rw-r--r--sys-kernel/hppa-sources/hppa-sources-2.4.26_p7-r1.ebuild3
3 files changed, 31 insertions, 2 deletions
diff --git a/sys-kernel/hppa-sources/ChangeLog b/sys-kernel/hppa-sources/ChangeLog
index d1d0de14f856..f3d29ec5f1b3 100644
--- a/sys-kernel/hppa-sources/ChangeLog
+++ b/sys-kernel/hppa-sources/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-kernel/hppa-sources
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/hppa-sources/ChangeLog,v 1.42 2004/08/09 22:50:22 gmsoft Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/hppa-sources/ChangeLog,v 1.43 2004/08/09 23:24:56 gmsoft Exp $
+
+ 09 Aug 2004; Guy Martin <gmsoft@gentoo.org>
+ +files/security-proc-cmdline.patch, hppa-sources-2.4.26_p7-r1.ebuild:
+ Fixed race condition in /proc/<pid>/cmdline (#59905).
*hppa-sources-2.4.26_p7-r1 (09 Aug 2004)
diff --git a/sys-kernel/hppa-sources/files/security-proc-cmdline.patch b/sys-kernel/hppa-sources/files/security-proc-cmdline.patch
new file mode 100644
index 000000000000..bb80884c394e
--- /dev/null
+++ b/sys-kernel/hppa-sources/files/security-proc-cmdline.patch
@@ -0,0 +1,24 @@
+
+From: Roger Luethi <rl@hellgate.ch>
+
+If you win the race with a starting process, you can read its environment.
+
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+---
+
+ 25-akpm/fs/proc/base.c | 2 ++
+ 1 files changed, 2 insertions(+)
+
+diff -puN fs/proc/base.c~proc_pid_cmdline-race-fix fs/proc/base.c
+--- 25/fs/proc/base.c~proc_pid_cmdline-race-fix 2004-08-05 11:28:21.915442360 -0700
++++ 25-akpm/fs/proc/base.c 2004-08-05 11:28:21.919441752 -0700
+@@ -340,6 +340,8 @@ static int proc_pid_cmdline(struct task_
+ struct mm_struct *mm = get_task_mm(task);
+ if (!mm)
+ goto out;
++ if (!mm->arg_end)
++ goto out; /* Shh! No looking before we're done */
+
+ len = mm->arg_end - mm->arg_start;
+
+_
diff --git a/sys-kernel/hppa-sources/hppa-sources-2.4.26_p7-r1.ebuild b/sys-kernel/hppa-sources/hppa-sources-2.4.26_p7-r1.ebuild
index f43ad0af245b..7ebdbadffe51 100644
--- a/sys-kernel/hppa-sources/hppa-sources-2.4.26_p7-r1.ebuild
+++ b/sys-kernel/hppa-sources/hppa-sources-2.4.26_p7-r1.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/hppa-sources/hppa-sources-2.4.26_p7-r1.ebuild,v 1.1 2004/08/09 22:50:22 gmsoft Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/hppa-sources/hppa-sources-2.4.26_p7-r1.ebuild,v 1.2 2004/08/09 23:24:56 gmsoft Exp $
#OKV=original kernel version, KV=patched kernel version. They can be the same.
ETYPE="sources"
@@ -58,6 +58,7 @@ src_unpack() {
epatch ${FILESDIR}/CAN-2004-0535-2.4-e1000.patch || die "Failed to patch CAN-2004-0535 security fix!"
epatch ${FILESDIR}/CAN-2004-0497.patch || die "Failed to patch CAN-2004-0497 security fix!"
epatch ${DISTDIR}/linux-2.4.26-CAN-2004-0415.patch || die "Failed to patch CAN-2004-0415 security fix!"
+ epatch ${FILESDIR}/security-proc-cmdline.patch || die "Failed to patch security-proc-cmdline.patch security fix!"
kernel_universal_unpack
}