Skip to contentSkip to conversation

pppoe: fix reference counting in PPPoE proxy

PATCH Applied Guillaume Nault 2 participants 2 messages Feb 15, 2016 – Feb 17, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pppoe: fix reference counting in PPPoE proxy

Drop reference on the relay_po socket when __pppoe_xmit() succeeds. This is already handled correctly in the error path.

---
No 'Fixes' tag, since this issue seems to predate git's history.

 drivers/net/ppp/pppoe.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ppp/pppoe.c +2 -0
index f3c6302..4ddae81 100644
@@ -395,6 +395,8 @@ static int pppoe_rcv_core(struct sock *sk, struct sk_buff *skb)
 
 		if (!__pppoe_xmit(sk_pppox(relay_po), skb))
 			goto abort_put;
+
+		sock_put(sk_pppox(relay_po));
 	} else {
 		if (sock_queue_rcv_skb(sk, skb))
 			goto abort_kfree;
Signature · 1 line
2.7.0
maintainer Applied
#1 lore raw

From: Guillaume Nault <[email protected]>
Date: Mon, 15 Feb 2016 17:01:10 +0100

Quoted 6 lines

Drop reference on the relay_po socket when __pppoe_xmit() succeeds. This is already handled correctly in the error path.

---
No 'Fixes' tag, since this issue seems to predate git's history.

Hard to believe that such an obvious leak has existed for so long.

Applied, and queued up for -stable, thanks!