linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: syzbot <syzbot+c72da7b9ed57cde6fca2@syzkaller.appspotmail.com>
Cc: David Miller <davem@davemloft.net>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Jiri Pirko <jiri@resnulli.us>, Jakub Kicinski <kuba@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	syzkaller-bugs <syzkaller-bugs@googlegroups.com>
Subject: Re: KASAN: slab-out-of-bounds Write in tcindex_set_parms
Date: Tue, 10 Mar 2020 11:31:06 -0700	[thread overview]
Message-ID: <CAM_iQpXrLCmQGXr8C9iw0+QxsP6DtQqoRqG18aegPhpjcpXdhQ@mail.gmail.com> (raw)
In-Reply-To: <000000000000490abd05a05fa060@google.com>

On Sun, Mar 8, 2020 at 3:44 PM syzbot
<syzbot+c72da7b9ed57cde6fca2@syzkaller.appspotmail.com> wrote:
>
> Hello,
>
> syzbot found the following crash on:
>
> HEAD commit:    425c075d Merge branch 'tun-debug'
> git tree:       net-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=134d2ae3e00000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=598678fc6e800071
> dashboard link: https://syzkaller.appspot.com/bug?extid=c72da7b9ed57cde6fca2
> compiler:       gcc (GCC) 9.0.0 20181231 (experimental)
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=122ed70de00000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=116689fde00000
>
> The bug was bisected to:
>
> commit 599be01ee567b61f4471ee8078870847d0a11e8e
> Author: Cong Wang <xiyou.wangcong@gmail.com>
> Date:   Mon Feb 3 05:14:35 2020 +0000
>
>     net_sched: fix an OOB access in cls_tcindex
>
> bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=150a7d53e00000
> final crash:    https://syzkaller.appspot.com/x/report.txt?x=170a7d53e00000
> console output: https://syzkaller.appspot.com/x/log.txt?x=130a7d53e00000
>
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+c72da7b9ed57cde6fca2@syzkaller.appspotmail.com
> Fixes: 599be01ee567 ("net_sched: fix an OOB access in cls_tcindex")
>
> IPVS: ftp: loaded support on port[0] = 21
> ==================================================================
> BUG: KASAN: slab-out-of-bounds in tcindex_set_parms+0x17fd/0x1a00 net/sched/cls_tcindex.c:455
> Write of size 16 at addr ffff8880a219e6b8 by task syz-executor508/9705
>
> CPU: 1 PID: 9705 Comm: syz-executor508 Not tainted 5.6.0-rc3-syzkaller #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> Call Trace:
>  __dump_stack lib/dump_stack.c:77 [inline]
>  dump_stack+0x188/0x20d lib/dump_stack.c:118
>  print_address_description.constprop.0.cold+0xd3/0x315 mm/kasan/report.c:374
>  __kasan_report.cold+0x1a/0x32 mm/kasan/report.c:506
>  kasan_report+0xe/0x20 mm/kasan/common.c:641
>  tcindex_set_parms+0x17fd/0x1a00 net/sched/cls_tcindex.c:455


I think we probably don't check the boundary of 'handle' properly.

397         if (cp->perfect || valid_perfect_hash(cp))
398                 if (handle >= cp->alloc_hash)
399                         goto errout_alloc;

I will think more about it.

Thanks.

  reply	other threads:[~2020-03-10 18:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-08 22:44 KASAN: slab-out-of-bounds Write in tcindex_set_parms syzbot
2020-03-10 18:31 ` Cong Wang [this message]
2020-03-11  0:33 ` Cong Wang
2020-03-11  4:56   ` syzbot

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=CAM_iQpXrLCmQGXr8C9iw0+QxsP6DtQqoRqG18aegPhpjcpXdhQ@mail.gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+c72da7b9ed57cde6fca2@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).