r2007 - in trunk/kernel/source: kernel-source-2.6.8-2.6.8/debian kernel-source-2.6.8-2.6.8/debian/patches kernel-source-2.6.8-2.6.8/debian/patches/series kernel-source-2.6.9-2.6.9/debian kernel-source-2.6.9-2.6.9/debian/patches kernel-source-2.6.9-2.6.9/debian/patches/series

Andres Salomon dilinger-guest@haydn.debian.org
Thu, 16 Dec 2004 21:09:46 -0700


Author: dilinger-guest
Date: 2004-12-16 21:09:38 -0700 (Thu, 16 Dec 2004)
New Revision: 2007

Added:
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/arch-x86_64-sys32_quotactl-overflow.dpatch
   trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/patches/arch-x86_64-sys32_quotactl-overflow.dpatch
Modified:
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-11
   trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/changelog
   trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/patches/series/2.6.9-4
Log:
  * [SECURITY] additional x86_64 buffer overflow fix; this time,
    sys32_quotactl (Andres Salomon).


Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog	2004-12-16 08:20:37 UTC (rev 2006)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog	2004-12-17 04:09:38 UTC (rev 2007)
@@ -35,6 +35,9 @@
     local DoS (CAN-2004-1074).  Thanks to Moritz Muehlenhoff for pointing
     this out.  64bit-arch fixes are also in here (Andres Salomon).
 
+  * [SECURITY] additional x86_64 buffer overflow fix; this time,
+    sys32_quotactl (Andres Salomon).
+
  -- dann frazier <dannf@debian.org>  Fri, 03 Dec 2004 00:13:41 -0700
 
 kernel-source-2.6.8 (2.6.8-10) unstable; urgency=high

Added: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/arch-x86_64-sys32_quotactl-overflow.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/arch-x86_64-sys32_quotactl-overflow.dpatch	2004-12-16 08:20:37 UTC (rev 2006)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/arch-x86_64-sys32_quotactl-overflow.dpatch	2004-12-17 04:09:38 UTC (rev 2007)
@@ -0,0 +1,28 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Buffer overrun in x86_64's sys32_quotactl()
+## DP: Patch author: Andres Salomon <dilinger@voxel.net>
+## DP: Upstream status: unsubmitted; sys32_quotactl is removed post-2.6.9.
+
+. $(dirname $0)/DPATCH
+
+@DPATCH@
+--- a/arch/x86_64/ia32/sys_ia32.c	2004-12-16 23:01:03.000000000 -0500
++++ b/arch/x86_64/ia32/sys_ia32.c	2004-12-16 23:03:54.000000000 -0500
+@@ -1329,11 +1329,11 @@
+ long sys32_quotactl(void)
+ { 
+ 	struct task_struct *me = current;
+-	static char lastcomm[8];
+-	if (strcmp(lastcomm, me->comm)) {
++	static char lastcomm[sizeof(me->comm)];
++	if (strncmp(lastcomm, me->comm, sizeof(me->comm))) {
+ 		printk(KERN_INFO "%s: 32bit quotactl not supported on 64 bit kernel\n",
+ 		       me->comm);
+-		strcpy(lastcomm, me->comm); 
++		strncpy(lastcomm, me->comm, sizeof(me->comm)); 
+ 	} 
+ 	return -ENOSYS;
+ } 

Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-11
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-11	2004-12-16 08:20:37 UTC (rev 2006)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-11	2004-12-17 04:09:38 UTC (rev 2007)
@@ -9,3 +9,4 @@
 + scm_send-dos-fix2.dpatch
 + binfmt-huge-vma-dos.dpatch
 + binfmt-huge-vma-dos2.dpatch
++ arch-x86_64-sys32_quotactl-overflow.dpatch

Modified: trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/changelog
===================================================================
--- trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/changelog	2004-12-16 08:20:37 UTC (rev 2006)
+++ trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/changelog	2004-12-17 04:09:38 UTC (rev 2007)
@@ -40,6 +40,9 @@
     local DoS (CAN-2004-1074).  Thanks to Moritz Muehlenhoff for pointing
     this out.  64bit-arch fixes are also in here (Andres Salomon).
 
+  * [SECURITY] additional x86_64 buffer overflow fix; this time,
+    sys32_quotactl (Andres Salomon).
+
  -- dann frazier <dannf@debian.org>  Fri, 03 Dec 2004 09:26:52 -0700
 
 kernel-source-2.6.9 (2.6.9-3) unstable; urgency=low

Added: trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/patches/arch-x86_64-sys32_quotactl-overflow.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/patches/arch-x86_64-sys32_quotactl-overflow.dpatch	2004-12-16 08:20:37 UTC (rev 2006)
+++ trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/patches/arch-x86_64-sys32_quotactl-overflow.dpatch	2004-12-17 04:09:38 UTC (rev 2007)
@@ -0,0 +1,28 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Buffer overrun in x86_64's sys32_quotactl()
+## DP: Patch author: Andres Salomon <dilinger@voxel.net>
+## DP: Upstream status: unsubmitted; sys32_quotactl is removed post-2.6.9.
+
+. $(dirname $0)/DPATCH
+
+@DPATCH@
+--- a/arch/x86_64/ia32/sys_ia32.c	2004-12-16 23:01:03.000000000 -0500
++++ b/arch/x86_64/ia32/sys_ia32.c	2004-12-16 23:03:54.000000000 -0500
+@@ -1329,11 +1329,11 @@
+ long sys32_quotactl(void)
+ { 
+ 	struct task_struct *me = current;
+-	static char lastcomm[8];
+-	if (strcmp(lastcomm, me->comm)) {
++	static char lastcomm[sizeof(me->comm)];
++	if (strncmp(lastcomm, me->comm, sizeof(me->comm))) {
+ 		printk(KERN_INFO "%s: 32bit quotactl not supported on 64 bit kernel\n",
+ 		       me->comm);
+-		strcpy(lastcomm, me->comm); 
++		strncpy(lastcomm, me->comm, sizeof(me->comm)); 
+ 	} 
+ 	return -ENOSYS;
+ } 

Modified: trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/patches/series/2.6.9-4
===================================================================
--- trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/patches/series/2.6.9-4	2004-12-16 08:20:37 UTC (rev 2006)
+++ trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/patches/series/2.6.9-4	2004-12-17 04:09:38 UTC (rev 2007)
@@ -11,3 +11,4 @@
 + scm_send-dos-fix2.dpatch
 + binfmt-huge-vma-dos.dpatch
 + binfmt-huge-vma-dos2.dpatch
++ arch-x86_64-sys32_quotactl-overflow.dpatch