[079/152] pppoe.c: Fix kernel panic caused by __pppoe_xmit

From: Greg KH
Date: Wed Jan 05 2011 - 19:46:55 EST

2.6.36-stable review patch. If anyone has any objections, please let us know.


From: Andrej Ota <andrej@xxxxxx>

[ Upstream commit 2a27a03d3a891e87ca33d27a858b4db734a4cbab ]

__pppoe_xmit function return value was invalid resulting in
additional call to kfree_skb on already freed skb. This resulted in
memory corruption and consequent kernel panic after PPPoE peer
terminated the link.

This fixes commit 55c95e738da85373965cb03b4f975d0fd559865b.

Reported-by: Gorik Van Steenberge <gvs@xxxxxxxxx>
Reported-by: Daniel Kenzelmann <kernel.bugzilla@xxxxxxxxxxxxxxxxxxxxxx>
Reported-by: Denys Fedoryshchenko <nuclearcat@xxxxxxxxxxxxxx>
Reported-by: Pawel Staszewski <pstaszewski@xxxxxxxxx>
Diagnosed-by: Andrej Ota <andrej@xxxxxx>
Diagnosed-by: Eric Dumazet <eric.dumazet@xxxxxxxxx>
Tested-by: Denys Fedoryshchenko <nuclearcat@xxxxxxxxxxxxxx>
Tested-by: Pawel Staszewski <pstaszewski@xxxxxxxxx>
Signed-off-by: Jarek Poplawski <jarkao2@xxxxxxxxx>
Signed-off-by: Andrej Ota <andrej@xxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
drivers/net/pppoe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/pppoe.c
+++ b/drivers/net/pppoe.c
@@ -948,7 +948,7 @@ static int __pppoe_xmit(struct sock *sk,

- return 0;
+ return 1;


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/