summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Yamin <plasmaroo@gentoo.org>2004-02-16 14:47:20 +0000
committerTim Yamin <plasmaroo@gentoo.org>2004-02-16 14:47:20 +0000
commit20a72b35ef82c896c9ae4f834e74f08f785cd4a9 (patch)
tree1564204e70d8e97a64c18da701663bc4c0a067da /sys-kernel/ck-sources
parentBump (diff)
downloadhistorical-20a72b35ef82c896c9ae4f834e74f08f785cd4a9.tar.gz
historical-20a72b35ef82c896c9ae4f834e74f08f785cd4a9.tar.bz2
historical-20a72b35ef82c896c9ae4f834e74f08f785cd4a9.zip
Added the fix for the ptrace vulnerability for AMD64 platforms.
Diffstat (limited to 'sys-kernel/ck-sources')
-rw-r--r--sys-kernel/ck-sources/ChangeLog7
-rw-r--r--sys-kernel/ck-sources/ck-sources-2.4.24-r1.ebuild3
-rw-r--r--sys-kernel/ck-sources/files/ck-sources-2.4.24.CAN-2004-0001.patch29
3 files changed, 37 insertions, 2 deletions
diff --git a/sys-kernel/ck-sources/ChangeLog b/sys-kernel/ck-sources/ChangeLog
index 5c73965e0009..4568218ff03e 100644
--- a/sys-kernel/ck-sources/ChangeLog
+++ b/sys-kernel/ck-sources/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-kernel/ck-sources
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/ck-sources/ChangeLog,v 1.19 2004/02/16 12:08:44 spock Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/ck-sources/ChangeLog,v 1.20 2004/02/16 14:42:39 plasmaroo Exp $
+
+ 16 Feb 2004; <plasmaroo@gentoo.org> ck-sources-2.4.24-r1.ebuild,
+ files/ck-sources-2.4.24.CAN-2004-0001.patch:
+ Added the fix for the ptrace vulnerability for AMD64 platforms. Users
+ of 2.6.2 are not affected by the vulnerability.
*ck-sources-2.6.2-r1 (16 Feb 2004)
diff --git a/sys-kernel/ck-sources/ck-sources-2.4.24-r1.ebuild b/sys-kernel/ck-sources/ck-sources-2.4.24-r1.ebuild
index b6f9d6f75672..d17f6494049d 100644
--- a/sys-kernel/ck-sources/ck-sources-2.4.24-r1.ebuild
+++ b/sys-kernel/ck-sources/ck-sources-2.4.24-r1.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/ck-sources/ck-sources-2.4.24-r1.ebuild,v 1.1 2004/01/09 12:12:31 plasmaroo Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/ck-sources/ck-sources-2.4.24-r1.ebuild,v 1.2 2004/02/16 14:42:40 plasmaroo Exp $
IUSE="build"
@@ -58,6 +58,7 @@ src_unpack() {
fi
bzcat ${DISTDIR}/patch-${KV}.bz2|patch -p1 || die "-ck patch failed"
+ epatch ${FILESDIR}/${P}.CAN-2004-0001.patch || die "Failed to apply AMD64 ptrace patch!"
kernel_universal_unpack
}
diff --git a/sys-kernel/ck-sources/files/ck-sources-2.4.24.CAN-2004-0001.patch b/sys-kernel/ck-sources/files/ck-sources-2.4.24.CAN-2004-0001.patch
new file mode 100644
index 000000000000..bb51f9aa9a62
--- /dev/null
+++ b/sys-kernel/ck-sources/files/ck-sources-2.4.24.CAN-2004-0001.patch
@@ -0,0 +1,29 @@
+diff -u linux/arch/x86_64/ia32/ptrace32.c-PTRACE linux/arch/x86_64/ia32/ptrace32.c
+--- linux/arch/x86_64/ia32/ptrace32.c-PTRACE 2003-06-16 13:03:58.000000000 +0200
++++ linux/arch/x86_64/ia32/ptrace32.c 2004-01-07 18:04:43.000000000 +0100
+@@ -25,6 +25,10 @@
+ #include <asm/fpu32.h>
+ #include <linux/mm.h>
+
++/* determines which flags the user has access to. */
++/* 1 = access 0 = no access */
++#define FLAG_MASK 0x44dd5UL
++
+ #define R32(l,q) \
+ case offsetof(struct user32, regs.l): stack[offsetof(struct pt_regs, q)/8] = val; break
+
+@@ -69,9 +73,12 @@
+ R32(eip, rip);
+ R32(esp, rsp);
+
+- case offsetof(struct user32, regs.eflags):
+- stack[offsetof(struct pt_regs, eflags)/8] = val & 0x44dd5;
++ case offsetof(struct user32, regs.eflags): {
++ __u64 *flags = &stack[offsetof(struct pt_regs, eflags)/8];
++ val &= FLAG_MASK;
++ *flags = val | (*flags & ~FLAG_MASK);
+ break;
++ }
+
+ case offsetof(struct user32, u_debugreg[4]):
+ case offsetof(struct user32, u_debugreg[5]):