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

Dann Frazier dannf at alioth.debian.org
Mon Apr 4 02:10:36 UTC 2011


Author: dannf
Date: Mon Apr  4 02:10:35 2011
New Revision: 17196

Log:
dccp: fix oops on Reset after close (CVE-2011-1093)

Added:
   dists/lenny-security/linux-2.6/debian/patches/bugfix/all/dccp-fix-oops-on-Reset-after-close.patch
Modified:
   dists/lenny-security/linux-2.6/debian/changelog
   dists/lenny-security/linux-2.6/debian/patches/series/26lenny3

Modified: dists/lenny-security/linux-2.6/debian/changelog
==============================================================================
--- dists/lenny-security/linux-2.6/debian/changelog	Mon Apr  4 02:03:03 2011	(r17195)
+++ dists/lenny-security/linux-2.6/debian/changelog	Mon Apr  4 02:10:35 2011	(r17196)
@@ -11,6 +11,7 @@
   * bridge: netfilter: fix information leak (CVE-2011-1080)
   * nfs4: Ensure that ACL pages sent over NFS were not allocated from the slab
     (CVE-2011-1090)
+  * dccp: fix oops on Reset after close (CVE-2011-1093)
 
  -- dann frazier <dannf at debian.org>  Wed, 30 Mar 2011 22:46:26 -0600
 

Added: dists/lenny-security/linux-2.6/debian/patches/bugfix/all/dccp-fix-oops-on-Reset-after-close.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/lenny-security/linux-2.6/debian/patches/bugfix/all/dccp-fix-oops-on-Reset-after-close.patch	Mon Apr  4 02:10:35 2011	(r17196)
@@ -0,0 +1,69 @@
+commit 720dc34bbbe9493c7bd48b2243058b4e447a929d
+Author: Gerrit Renker <gerrit at erg.abdn.ac.uk>
+Date:   Tue Mar 1 23:02:07 2011 -0800
+
+    dccp: fix oops on Reset after close
+    
+    This fixes a bug in the order of dccp_rcv_state_process() that still permitted
+    reception even after closing the socket. A Reset after close thus causes a NULL
+    pointer dereference by not preventing operations on an already torn-down socket.
+    
+     dccp_v4_do_rcv()
+    	|
+    	| state other than OPEN
+    	v
+     dccp_rcv_state_process()
+    	|
+    	| DCCP_PKT_RESET
+    	v
+     dccp_rcv_reset()
+    	|
+    	v
+     dccp_time_wait()
+    
+     WARNING: at net/ipv4/inet_timewait_sock.c:141 __inet_twsk_hashdance+0x48/0x128()
+     Modules linked in: arc4 ecb carl9170 rt2870sta(C) mac80211 r8712u(C) crc_ccitt ah
+     [<c0038850>] (unwind_backtrace+0x0/0xec) from [<c0055364>] (warn_slowpath_common)
+     [<c0055364>] (warn_slowpath_common+0x4c/0x64) from [<c0055398>] (warn_slowpath_n)
+     [<c0055398>] (warn_slowpath_null+0x1c/0x24) from [<c02b72d0>] (__inet_twsk_hashd)
+     [<c02b72d0>] (__inet_twsk_hashdance+0x48/0x128) from [<c031caa0>] (dccp_time_wai)
+     [<c031caa0>] (dccp_time_wait+0x40/0xc8) from [<c031c15c>] (dccp_rcv_state_proces)
+     [<c031c15c>] (dccp_rcv_state_process+0x120/0x538) from [<c032609c>] (dccp_v4_do_)
+     [<c032609c>] (dccp_v4_do_rcv+0x11c/0x14c) from [<c0286594>] (release_sock+0xac/0)
+     [<c0286594>] (release_sock+0xac/0x110) from [<c031fd34>] (dccp_close+0x28c/0x380)
+     [<c031fd34>] (dccp_close+0x28c/0x380) from [<c02d9a78>] (inet_release+0x64/0x70)
+    
+    The fix is by testing the socket state first. Receiving a packet in Closed state
+    now also produces the required "No connection" Reset reply of RFC 4340, 8.3.1.
+    
+    Reported-and-tested-by: Johan Hovold <jhovold at gmail.com>
+    Cc: stable at kernel.org
+    Signed-off-by: Gerrit Renker <gerrit at erg.abdn.ac.uk>
+    Signed-off-by: David S. Miller <davem at davemloft.net>
+    [dannf: backported to Debian's 2.6.26]
+
+diff --git a/net/dccp/input.c b/net/dccp/input.c
+index 08392ed..ee30e18 100644
+--- a/net/dccp/input.c
++++ b/net/dccp/input.c
+@@ -600,6 +600,9 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
+ 		/* Caller (dccp_v4_do_rcv) will send Reset */
+ 		dcb->dccpd_reset_code = DCCP_RESET_CODE_NO_CONNECTION;
+ 		return 1;
++	} else if (sk->sk_state == DCCP_CLOSED) {
++		dcb->dccpd_reset_code = DCCP_RESET_CODE_NO_CONNECTION;
++		return 1;
+ 	}
+ 
+ 	if (sk->sk_state != DCCP_REQUESTING) {
+@@ -662,10 +665,6 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
+ 	}
+ 
+ 	switch (sk->sk_state) {
+-	case DCCP_CLOSED:
+-		dcb->dccpd_reset_code = DCCP_RESET_CODE_NO_CONNECTION;
+-		return 1;
+-
+ 	case DCCP_REQUESTING:
+ 		/* FIXME: do congestion control initialization */
+ 

Modified: dists/lenny-security/linux-2.6/debian/patches/series/26lenny3
==============================================================================
--- dists/lenny-security/linux-2.6/debian/patches/series/26lenny3	Mon Apr  4 02:03:03 2011	(r17195)
+++ dists/lenny-security/linux-2.6/debian/patches/series/26lenny3	Mon Apr  4 02:10:35 2011	(r17196)
@@ -9,3 +9,4 @@
 + bugfix/all/bridge-netfilter-fix-information-leak.patch
 + bugfix/all/nfs4-ensure-that-acl-pages-sent-over-nfs-were-not-allocated-from-the-slab.patch
 + bugfix/all/nfs4-ensure-that-acl-pages-sent-over-nfs-were-not-allocated-from-the-slab-compilation-warning.patch
++ bugfix/all/dccp-fix-oops-on-Reset-after-close.patch



More information about the Kernel-svn-changes mailing list