[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1286786794-10410-1-git-send-email-jslaby@suse.cz>
Date: Mon, 11 Oct 2010 10:46:34 +0200
From: Jiri Slaby <jslaby@...e.cz>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, linux-atm-general@...ts.sourceforge.net,
linux-kernel@...r.kernel.org, jirislaby@...il.com,
Eric Dumazet <eric.dumazet@...il.com>
Subject: [PATCH 1/1] ATM: mpc, fix use after free
Stanse found that mpc_push frees skb and then it dereferences it. It
is a typo, new_skb should be dereferenced there.
Signed-off-by: Jiri Slaby <jslaby@...e.cz>
Cc: Eric Dumazet <eric.dumazet@...il.com>
---
net/atm/mpc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/atm/mpc.c b/net/atm/mpc.c
index 622b471..74bcc66 100644
--- a/net/atm/mpc.c
+++ b/net/atm/mpc.c
@@ -778,7 +778,7 @@ static void mpc_push(struct atm_vcc *vcc, struct sk_buff *skb)
eg->packets_rcvd++;
mpc->eg_ops->put(eg);
- memset(ATM_SKB(skb), 0, sizeof(struct atm_skb_data));
+ memset(ATM_SKB(new_skb), 0, sizeof(struct atm_skb_data));
netif_rx(new_skb);
}
--
1.7.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists