kernel/3.18: update to version 3.18.25
[openwrt/openwrt.git] / target / linux / generic / patches-3.18 / 081-02-pppoe-Lacks-DST-MAC-address-check.patch
1 From: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
2 Date: Mon, 20 Apr 2015 21:07:48 +0200
3 Subject: [PATCH] pppoe: Lacks DST MAC address check
4
5 A pppoe session is identified by its session ID and MAC address.
6 Currently pppoe does not check if the received pkg has the correct
7 MAC address. This is a problem when the eth I/F is in promisc mode
8 as then any DST MAC address is accepted.
9
10 Signed-off-by: Joakim Tjernlund <joakim.tjernlund@transmode.se>
11 Signed-off-by: David S. Miller <davem@davemloft.net>
12 ---
13
14 --- a/drivers/net/ppp/pppoe.c
15 +++ b/drivers/net/ppp/pppoe.c
16 @@ -379,6 +379,9 @@ static int pppoe_rcv_core(struct sock *s
17 * can't change.
18 */
19
20 + if (skb->pkt_type == PACKET_OTHERHOST)
21 + goto abort_kfree;
22 +
23 if (sk->sk_state & PPPOX_BOUND) {
24 ppp_input(&po->chan, skb);
25 } else if (sk->sk_state & PPPOX_RELAY) {