lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 10 Mar 2020 11:31:06 -0700
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     syzbot <syzbot+c72da7b9ed57cde6fca2@...kaller.appspotmail.com>
Cc:     David Miller <davem@...emloft.net>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Jiri Pirko <jiri@...nulli.us>,
        Jakub Kicinski <kuba@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>,
        syzkaller-bugs <syzkaller-bugs@...glegroups.com>
Subject: Re: KASAN: slab-out-of-bounds Write in tcindex_set_parms

On Sun, Mar 8, 2020 at 3:44 PM syzbot
<syzbot+c72da7b9ed57cde6fca2@...kaller.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@...il.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@...kaller.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.

Powered by blists - more mailing lists