[kernel] r16585 - in dists/lenny-security/linux-2.6/debian: . patches/bugfix/all patches/series

Dann Frazier dannf at alioth.debian.org
Sun Nov 21 01:22:23 UTC 2010


Author: dannf
Date: Sun Nov 21 01:22:20 2010
New Revision: 16585

Log:
ipc: initialize structure memory to zero for compat functions
(CVE-2010-4073)

Added:
   dists/lenny-security/linux-2.6/debian/patches/bugfix/all/ipc-initialize-structure-memory-to-zero-for-compat-functions.patch
Modified:
   dists/lenny-security/linux-2.6/debian/changelog
   dists/lenny-security/linux-2.6/debian/patches/series/25lenny2

Modified: dists/lenny-security/linux-2.6/debian/changelog
==============================================================================
--- dists/lenny-security/linux-2.6/debian/changelog	Sun Nov 21 01:19:17 2010	(r16584)
+++ dists/lenny-security/linux-2.6/debian/changelog	Sun Nov 21 01:22:20 2010	(r16585)
@@ -30,6 +30,8 @@
   * inet_diag: Make sure we actually run the same bytecode we audited
     (CVE-2010-3880)
   * ipc: shm: fix information leak to userland (CVE-2010-4072)
+  * ipc: initialize structure memory to zero for compat functions
+    (CVE-2010-4073)
 
  -- dann frazier <dannf at debian.org>  Thu, 30 Sep 2010 21:42:24 -0600
 

Added: dists/lenny-security/linux-2.6/debian/patches/bugfix/all/ipc-initialize-structure-memory-to-zero-for-compat-functions.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/lenny-security/linux-2.6/debian/patches/bugfix/all/ipc-initialize-structure-memory-to-zero-for-compat-functions.patch	Sun Nov 21 01:22:20 2010	(r16585)
@@ -0,0 +1,70 @@
+commit 4587b49a223733b4e43662b273e8e33abaae378d
+Author: Dan Rosenberg <drosenberg at vsecurity.com>
+Date:   Wed Oct 27 15:34:17 2010 -0700
+
+    ipc: initialize structure memory to zero for compat functions
+    
+    This takes care of leaking uninitialized kernel stack memory to
+    userspace from non-zeroed fields in structs in compat ipc functions.
+    
+    Signed-off-by: Dan Rosenberg <drosenberg at vsecurity.com>
+    Cc: Manfred Spraul <manfred at colorfullife.com>
+    Cc: Arnd Bergmann <arnd at arndb.de>
+    Cc: <stable at kernel.org>
+    Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
+    Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
+
+diff --git a/ipc/compat.c b/ipc/compat.c
+index ab76fb0..5e3e3a1 100644
+--- a/ipc/compat.c
++++ b/ipc/compat.c
+@@ -242,6 +242,8 @@ long compat_sys_semctl(int first, int second, int third, void __user *uptr)
+ 	struct semid64_ds __user *up64;
+ 	int version = compat_ipc_parse_version(&third);
+ 
++	memset(&s64, 0, sizeof(s64));
++
+ 	if (!uptr)
+ 		return -EINVAL;
+ 	if (get_user(pad, (u32 __user *) uptr))
+@@ -422,6 +424,8 @@ long compat_sys_msgctl(int first, int second, void __user *uptr)
+ 	int version = compat_ipc_parse_version(&second);
+ 	void __user *p;
+ 
++	memset(&m64, 0, sizeof(m64));
++
+ 	switch (second & (~IPC_64)) {
+ 	case IPC_INFO:
+ 	case IPC_RMID:
+@@ -595,6 +599,8 @@ long compat_sys_shmctl(int first, int second, void __user *uptr)
+ 	int err, err2;
+ 	int version = compat_ipc_parse_version(&second);
+ 
++	memset(&s64, 0, sizeof(s64));
++
+ 	switch (second & (~IPC_64)) {
+ 	case IPC_RMID:
+ 	case SHM_LOCK:
+diff --git a/ipc/compat_mq.c b/ipc/compat_mq.c
+index d8d1e9f..380ea4f 100644
+--- a/ipc/compat_mq.c
++++ b/ipc/compat_mq.c
+@@ -53,6 +53,9 @@ asmlinkage long compat_sys_mq_open(const char __user *u_name,
+ 	void __user *p = NULL;
+ 	if (u_attr && oflag & O_CREAT) {
+ 		struct mq_attr attr;
++
++		memset(&attr, 0, sizeof(attr));
++
+ 		p = compat_alloc_user_space(sizeof(attr));
+ 		if (get_compat_mq_attr(&attr, u_attr) ||
+ 		    copy_to_user(p, &attr, sizeof(attr)))
+@@ -127,6 +130,8 @@ asmlinkage long compat_sys_mq_getsetattr(mqd_t mqdes,
+ 	struct mq_attr __user *p = compat_alloc_user_space(2 * sizeof(*p));
+ 	long ret;
+ 
++	memset(&mqstat, 0, sizeof(mqstat));
++
+ 	if (u_mqstat) {
+ 		if (get_compat_mq_attr(&mqstat, u_mqstat) ||
+ 		    copy_to_user(p, &mqstat, sizeof(mqstat)))

Modified: dists/lenny-security/linux-2.6/debian/patches/series/25lenny2
==============================================================================
--- dists/lenny-security/linux-2.6/debian/patches/series/25lenny2	Sun Nov 21 01:19:17 2010	(r16584)
+++ dists/lenny-security/linux-2.6/debian/patches/series/25lenny2	Sun Nov 21 01:22:20 2010	(r16585)
@@ -24,3 +24,4 @@
 + bugfix/all/net-tipc-fix-information-leak-to-userland.patch
 + bugfix/all/inet_diag-make-sure-we-actually-run-the-same-bytecode-we-audited.patch
 + bugfix/all/ipc-shm-fix-information-leak-to-userland.patch
++ bugfix/all/ipc-initialize-structure-memory-to-zero-for-compat-functions.patch



More information about the Kernel-svn-changes mailing list