[CVE-2010-4342 Hardy] econet: Fix crash in aun_incoming(). CVE-2010-4342

Leann Ogasawara leann.ogasawara at canonical.com
Thu Mar 17 17:21:50 UTC 2011


The following changes since commit 7fec2f29a52bd5c07921df6e0dc443de7ef5c9f4:
  Brad Figg (1):
        UBUNTU: Ubuntu-2.6.24-29.88

are available in the git repository at:

  git://kernel.ubuntu.com/ogasawara/ubuntu-hardy.git CVE-2010-4342

David S. Miller (1):
      econet: Fix crash in aun_incoming(). CVE-2010-4342

 net/econet/af_econet.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

>From 606ddcaa582563642b898704c78dc88bb5ba7faf Mon Sep 17 00:00:00 2001
From: David S. Miller <davem at davemloft.net>
Date: Wed, 8 Dec 2010 18:42:23 -0800
Subject: [PATCH] econet: Fix crash in aun_incoming(). CVE-2010-4342

CVE-2010-4342

BugLink: http://bugs.launchpad.net/bugs/736394

Unconditional use of skb->dev won't work here,
try to fetch the econet device via skb_dst()->dev
instead.

Suggested by Eric Dumazet.

Reported-by: Nelson Elhage <nelhage at ksplice.com>
Tested-by: Nelson Elhage <nelhage at ksplice.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
(backport of upstream commit 4e085e76cbe558b79b54cbab772f61185879bc64)

Signed-off-by: Leann Ogasawara <leann.ogasawara at canonical.com>
---
 net/econet/af_econet.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index e37b874..59092f4 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -848,8 +848,12 @@ static void aun_incoming(struct sk_buff *skb, struct aunhdr *ah, size_t len)
 	struct iphdr *ip = ip_hdr(skb);
 	unsigned char stn = ntohl(ip->saddr) & 0xff;
 	struct sock *sk;
+	struct dst_entry *dst = skb->dst;
+	struct ec_device *edev = NULL;
 	struct sk_buff *newskb;
-	struct ec_device *edev = skb->dev->ec_ptr;
+
+	if (dst)
+		edev = dst->dev->ec_ptr;
 
 	if (! edev)
 		goto bad;
-- 
1.7.0.4







More information about the kernel-team mailing list