081-02-pppoe-Lacks-DST-MAC-address-check.patch 830 B

12345678910111213141516171819202122232425
  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. A pppoe session is identified by its session ID and MAC address.
  5. Currently pppoe does not check if the received pkg has the correct
  6. MAC address. This is a problem when the eth I/F is in promisc mode
  7. as then any DST MAC address is accepted.
  8. Signed-off-by: Joakim Tjernlund <joakim.tjernlund@transmode.se>
  9. Signed-off-by: David S. Miller <davem@davemloft.net>
  10. ---
  11. --- a/drivers/net/ppp/pppoe.c
  12. +++ b/drivers/net/ppp/pppoe.c
  13. @@ -379,6 +379,9 @@ static int pppoe_rcv_core(struct sock *s
  14. * can't change.
  15. */
  16. + if (skb->pkt_type == PACKET_OTHERHOST)
  17. + goto abort_kfree;
  18. +
  19. if (sk->sk_state & PPPOX_BOUND) {
  20. ppp_input(&po->chan, skb);
  21. } else if (sk->sk_state & PPPOX_RELAY) {