Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: ben@netservers.co.uk
Cc: paulus@samba.org, netdev@vger.kernel.org, linux-ppp@vger.kernel.org
Subject: Re: [PATCH] ppp: fix BUG on non-linear SKB (multilink receive)
Date: Mon, 16 Nov 2009 23:52:54 -0800 (PST)	[thread overview]
Message-ID: <20091116.235254.148428748.davem@davemloft.net> (raw)
In-Reply-To: <Pine.LNX.4.58.0911161334240.15274@benxen>

From: Ben McKeegan <ben@netservers.co.uk>
Date: Mon, 16 Nov 2009 13:44:25 +0000 (GMT)

> PPP does not correctly call pskb_may_pull() on all necessary receive paths
> before reading the PPP protocol, thus causing PPP to report seemingly
> random 'unsupported protocols' and eventually trigger BUG_ON(skb->len <
> skb->data_len) in skb_pull_rcsum() when receiving multilink protocol in
> non-linear skbs.
> 
> ppp_receive_nonmp_frame() does not call pskb_may_pull() before reading the
> protocol number.  For the non-mp receive path this is not a problem, as
> this check is done in ppp_receive_frame().  For the mp receive path,
> ppp_mp_reconstruct() usually copies the data into a new linear skb.
> However, in the case where the frame is made up of a single mp fragment,
> the mp header is pulled and the existing skb used.  This skb was then
> passed to ppp_receive_nonmp_frame() without checking if the encapsulated
> protocol header could safely be read.
> 
> Signed-off-by: Ben McKeegan <ben@netservers.co.uk>

Applied but:

> +	while ((skb = ppp_mp_reconstruct(ppp))) {
> +	  	if (pskb_may_pull(skb, 2))

There is a mix of space and tab characters leading up to
the "if (pskb_may_pull" there, I fixed it up but please
take care of such trivial issues before submitting your
patch next time.

Thanks.

      reply	other threads:[~2009-11-17  7:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-12 13:09 [PATCH] ppp: fix BUG on non-linear SKB (multilink receive) Ben McKeegan
2009-11-14  3:46 ` David Miller
2009-11-16 13:44   ` Ben McKeegan
2009-11-17  7:52     ` David Miller [this message]

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=20091116.235254.148428748.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ben@netservers.co.uk \
    --cc=linux-ppp@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=paulus@samba.org \
    /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