mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: David Miller <davem@davemloft.net>
Cc: kaber@trash.net, poemann@gmail.com, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: kernel BUG at net/core/skbuff.c in linux-2.6.21-rc6
Date: Sun, 15 Apr 2007 10:50:37 +1000	[thread overview]
Message-ID: <17953.30429.220756.818283@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <20070414.100441.15000708.davem@davemloft.net>

David Miller writes:

> Here is Patrick McHardy's patch:

So this doesn't change process_input_packet(), which treats the case
where the first byte is 0xff (PPP_ALLSTATIONS) but the second byte is
0x03 (PPP_UI) as indicating a packet with a PPP protocol number of
0xff.  Arguably that's wrong since PPP protocol 0xff is reserved, and
the RFC does envision the possibility of receiving frames where the
control field has values other than 0x03.

Therefore I think this patch is probably better.  Could people try it
out and let me know if it fixes the problem?

Paul.

diff --git a/drivers/net/ppp_async.c b/drivers/net/ppp_async.c
index 933e2f3..caabbc4 100644
--- a/drivers/net/ppp_async.c
+++ b/drivers/net/ppp_async.c
@@ -802,9 +802,9 @@ process_input_packet(struct asyncppp *ap)
 
 	/* check for address/control and protocol compression */
 	p = skb->data;
-	if (p[0] == PPP_ALLSTATIONS && p[1] == PPP_UI) {
+	if (p[0] == PPP_ALLSTATIONS) {
 		/* chop off address/control */
-		if (skb->len < 3)
+		if (p[1] != PPP_UI || skb->len < 3)
 			goto err;
 		p = skb_pull(skb, 2);
 	}

  parent reply	other threads:[~2007-04-15  0:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-07 18:11 Bartek
2007-04-08  6:47 ` David Miller
2007-04-08 20:15   ` Bartek
2007-04-10  9:19     ` Bartek
2007-04-10 11:25       ` Jesper Juhl
2007-04-12  5:18         ` Bartek
2007-04-12  5:43           ` Patrick McHardy
2007-04-13 23:16             ` David Miller
2007-04-14  6:00               ` Herbert Xu
2007-04-14 16:49               ` Paul Mackerras
2007-04-14 17:04                 ` David Miller
2007-04-14 17:10                   ` Patrick McHardy
2007-04-15  0:50                   ` Paul Mackerras [this message]
2007-04-15  1:05                     ` Paul Mackerras
2007-04-19 20:07                       ` David Miller
2007-04-18 12:42                     ` Jarek Poplawski
2007-04-18 21:35                     ` Herbert Xu
2007-04-19  8:49                       ` Bartek
2007-04-19 11:41                       ` Herbert Xu
2007-04-15 10:45               ` Bartek
2007-04-16  4:06                 ` Patrick McHardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17953.30429.220756.818283@cargo.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=davem@davemloft.net \
    --cc=kaber@trash.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=poemann@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®