Commit 36e82dfd authored by Linus Torvalds's avatar Linus Torvalds

Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [PPP]: Fix skbuff.c:BUG due incorrect logic in process_input_packet()
parents 0f851021 7c5050e3
...@@ -802,9 +802,9 @@ process_input_packet(struct asyncppp *ap) ...@@ -802,9 +802,9 @@ process_input_packet(struct asyncppp *ap)
/* check for address/control and protocol compression */ /* check for address/control and protocol compression */
p = skb->data; p = skb->data;
if (p[0] == PPP_ALLSTATIONS && p[1] == PPP_UI) { if (p[0] == PPP_ALLSTATIONS) {
/* chop off address/control */ /* chop off address/control */
if (skb->len < 3) if (p[1] != PPP_UI || skb->len < 3)
goto err; goto err;
p = skb_pull(skb, 2); p = skb_pull(skb, 2);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment