]> git.baikalelectronics.ru Git - kernel.git/commit
ppp_generic: pull 2 bytes so that PPP_PROTO(skb) is valid
authorSimon Arlott <simon@fire.lp0.eu>
Mon, 3 May 2010 10:19:33 +0000 (10:19 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 May 2010 20:27:00 +0000 (13:27 -0700)
commit4f83fd2d0b0e0395ed99512d9a9f0f728205508c
treedc7b905fd3a5b76f00705cd76d25e12cced842f5
parent6d153e02f58e7c65633dad91919551b0a64c42fd
ppp_generic: pull 2 bytes so that PPP_PROTO(skb) is valid

In ppp_input(), PPP_PROTO(skb) may refer to invalid data in the skb.

If this happens and (proto >= 0xc000 || proto == PPP_CCPFRAG) then
the packet is passed directly to pppd.

This occurs frequently when using PPPoE with an interface MTU
greater than 1500 because the skb is more likely to be non-linear.

The next 2 bytes need to be pulled in ppp_input(). The pull of 2
bytes in ppp_receive_frame() has been removed as it is no longer
required.

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ppp_generic.c