netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Guillaume Nault <g.nault@alphalink.fr>,
	Alexander Potapenko <glider@google.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	syzbot+f5f6080811c849739212@syzkaller.appspotmail.com,
	LKML <linux-kernel@vger.kernel.org>,
	mostrows@earthlink.net, Networking <netdev@vger.kernel.org>,
	syzkaller-bugs@googlegroups.com
Subject: Re: KMSAN: uninit-value in pppoe_rcv
Date: Thu, 13 Sep 2018 10:31:16 -0700	[thread overview]
Message-ID: <9b41183c-34ea-33d3-a1bf-b0d283675af2@gmail.com> (raw)
In-Reply-To: <20180913172344.GB1507@alphalink.fr>



On 09/13/2018 10:23 AM, Guillaume Nault wrote:

> Nothing to change in tun.c. Just some more tests in pppoe.
> Can you try this patch? It only addresses this particular report, not
> the problems spotted by Eric.
> 
> -------- 8< --------
> diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c
> index 5aa59f41bf8c..77241b584dff 100644
> --- a/drivers/net/ppp/pppoe.c
> +++ b/drivers/net/ppp/pppoe.c
> @@ -429,6 +429,9 @@ static int pppoe_rcv(struct sk_buff *skb, struct net_device *dev,
>  	if (!skb)
>  		goto out;
>  
> +	if (skb_mac_header_len(skb) < ETH_HLEN)
> +		goto drop;
> +
>  	if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr)))
>  		goto drop;
>  
> 


Yeah this probably will help ;)

  reply	other threads:[~2018-09-13 17:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12 10:24 KMSAN: uninit-value in pppoe_rcv syzbot
2018-09-12 10:38 ` Alexander Potapenko
2018-09-13 13:57   ` Eric Dumazet
2018-09-13 14:12     ` Alexander Potapenko
2018-09-13 16:19       ` Guillaume Nault
2018-09-13 17:23         ` Guillaume Nault
2018-09-13 17:31           ` Eric Dumazet [this message]
2018-09-13 16:35       ` Eric Dumazet
2018-09-18 16:52     ` Guillaume Nault
2018-09-18 17:03       ` Eric Dumazet

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=9b41183c-34ea-33d3-a1bf-b0d283675af2@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=g.nault@alphalink.fr \
    --cc=glider@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mostrows@earthlink.net \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+f5f6080811c849739212@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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;
as well as URLs for NNTP newsgroup(s).