netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: xiyou.wangcong@gmail.com
Cc: netdev@vger.kernel.org,
	syzbot+5af9a90dad568aa9f611@syzkaller.appspotmail.com,
	syzbot+2f07903a5b05e7f36410@syzkaller.appspotmail.com,
	eric.dumazet@gmail.com
Subject: Re: [Patch net] net_sched: fix datalen for ematch
Date: Thu, 23 Jan 2020 21:35:29 +0100 (CET)	[thread overview]
Message-ID: <20200123.213529.793076422651134151.davem@davemloft.net> (raw)
In-Reply-To: <20200122234203.15441-1-xiyou.wangcong@gmail.com>

From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Wed, 22 Jan 2020 15:42:02 -0800

> syzbot reported an out-of-bound access in em_nbyte. As initially
> analyzed by Eric, this is because em_nbyte sets its own em->datalen
> in em_nbyte_change() other than the one specified by user, but this
> value gets overwritten later by its caller tcf_em_validate().
> We should leave em->datalen untouched to respect their choices.
> 
> I audit all the in-tree ematch users, all of those implement
> ->change() set em->datalen, so we can just avoid setting it twice
> in this case.
> 
> Reported-and-tested-by: syzbot+5af9a90dad568aa9f611@syzkaller.appspotmail.com
> Reported-by: syzbot+2f07903a5b05e7f36410@syzkaller.appspotmail.com
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Cc: Eric Dumazet <eric.dumazet@gmail.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>

Applied and queued up for -stable, thanks.

      parent reply	other threads:[~2020-01-23 20:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-22 23:42 [Patch net] net_sched: fix datalen for ematch Cong Wang
2020-01-22 23:45 ` Eric Dumazet
2020-01-23 20:35 ` 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=20200123.213529.793076422651134151.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+2f07903a5b05e7f36410@syzkaller.appspotmail.com \
    --cc=syzbot+5af9a90dad568aa9f611@syzkaller.appspotmail.com \
    --cc=xiyou.wangcong@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;
as well as URLs for NNTP newsgroup(s).