rpms/kernel/F-7 linux-2.6-net-dst_entry-reorder-crash.patch, NONE, 1.1 kernel-2.6.spec, 1.3302, 1.3303

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Wed Aug 1 18:00:20 UTC 2007


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29794

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-net-dst_entry-reorder-crash.patch 
Log Message:
* Wed Aug 01 2007 Chuck Ebbert <cebbert at redhat.com>
- fix crash in xfrm4


linux-2.6-net-dst_entry-reorder-crash.patch:

--- NEW FILE linux-2.6-net-dst_entry-reorder-crash.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bd0bf0765ea1fba80d7085e1f0375ec045631dc1
Commit:     bd0bf0765ea1fba80d7085e1f0375ec045631dc1
Parent:     16751347a060a10c09b11593bb179fd5b0240c04
Author:     Patrick McHardy <kaber at trash.net>
AuthorDate: Wed Jul 18 01:55:52 2007 -0700
Committer:  David S. Miller <davem at davemloft.net>
CommitDate: Wed Jul 18 01:55:52 2007 -0700

    [XFRM]: Fix crash introduced by struct dst_entry reordering
    
    XFRM expects xfrm_dst->u.next to be same pointer as dst->next, which
    was broken by the dst_entry reordering in commit 1e19e02c~, causing
    an oops in xfrm_bundle_ok when walking the bundle upwards.
    
    Kill xfrm_dst->u.next and change the only user to use dst->next instead.
    
    Signed-off-by: Patrick McHardy <kaber at trash.net>
    Signed-off-by: David S. Miller <davem at davemloft.net>
---
 include/net/xfrm.h     |    1 -
 net/xfrm/xfrm_policy.c |    2 +-
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index ae959e9..a5f80bf 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -585,7 +585,6 @@ static inline int xfrm_sec_ctx_match(struct xfrm_sec_ctx *s1, struct xfrm_sec_ct
 struct xfrm_dst
 {
 	union {
-		struct xfrm_dst		*next;
 		struct dst_entry	dst;
 		struct rtable		rt;
 		struct rt6_info		rt6;
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 157bfbd..b48f06f 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -2141,7 +2141,7 @@ int xfrm_bundle_ok(struct xfrm_policy *pol, struct xfrm_dst *first,
 		if (last == first)
 			break;
 
-		last = last->u.next;
+		last = (struct xfrm_dst *)last->u.dst.next;
 		last->child_mtu_cached = mtu;
 	}
 


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/kernel-2.6.spec,v
retrieving revision 1.3302
retrieving revision 1.3303
diff -u -r1.3302 -r1.3303
--- kernel-2.6.spec	31 Jul 2007 13:22:28 -0000	1.3302
+++ kernel-2.6.spec	1 Aug 2007 17:59:50 -0000	1.3303
@@ -576,6 +576,7 @@
 Patch430: linux-2.6-net-silence-noisy-printks.patch
 Patch431: linux-2.6-tcp-sack-fix-leak-msgs.patch
 Patch432: linux-2.6-net_sched_fix_deadlock.patch
+Patch433: linux-2.6-net-dst_entry-reorder-crash.patch
 Patch440: linux-2.6-sha_alignment.patch
 Patch450: linux-2.6-input-kill-stupid-messages.patch
 Patch451: linux-2.6-input-rfkill-wrong-size-flags.patch
@@ -1251,6 +1252,8 @@
 ApplyPatch linux-2.6-tcp-sack-fix-leak-msgs.patch
 # deadlock in net scheduler(s)
 ApplyPatch linux-2.6-net_sched_fix_deadlock.patch
+# fix crash in xfrm4
+ApplyPatch linux-2.6-net-dst_entry-reorder-crash.patch
 
 # Misc fixes
 # Fix SHA1 alignment problem on ia64
@@ -2304,6 +2307,9 @@
 %endif
 
 %changelog
+* Wed Aug 01 2007 Chuck Ebbert <cebbert at redhat.com>
+- fix crash in xfrm4
+
 * Tue Jul 31 2007 David Woodhouse <dwmw2 at infradead.org>
 - fix softmac deadlock.
 




More information about the fedora-extras-commits mailing list