netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Cong Wang <xiyou.wangcong@gmail.com>,
	syzbot+37b8770e6d5a8220a039@syzkaller.appspotmail.com
Cc: David Miller <davem@davemloft.net>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Jiri Pirko <jiri@resnulli.us>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	syzkaller-bugs@googlegroups.com
Subject: Re: KASAN: use-after-free Read in tcf_block_find
Date: Wed, 26 Sep 2018 14:50:42 -0700	[thread overview]
Message-ID: <7fcb1c03-6976-9b34-601d-5f50b74c5b0a@gmail.com> (raw)
In-Reply-To: <CAM_iQpXxzR3GP4wK7z+wW_0-vC9cuyiwnrCYqx+NpBgDvBXLcg@mail.gmail.com>



On 09/26/2018 02:44 PM, Cong Wang wrote:
> On Wed, Sep 26, 2018 at 8:44 AM syzbot
> <syzbot+37b8770e6d5a8220a039@syzkaller.appspotmail.com> wrote:
>>
>> Hello,
>>
>> syzbot found the following crash on:
>>
>> HEAD commit:    4b1bd6976945 net: phy: marvell: Fix build.
>> git tree:       net-next
>> console output: https://syzkaller.appspot.com/x/log.txt?x=16f763fa400000
>> kernel config:  https://syzkaller.appspot.com/x/.config?x=443816db871edd66
>> dashboard link: https://syzkaller.appspot.com/bug?extid=37b8770e6d5a8220a039
>> compiler:       gcc (GCC) 8.0.1 20180413 (experimental)
>> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=17a5614e400000
>> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=141a532a400000
>>
>> IMPORTANT: if you fix the bug, please add the following tag to the commit:
>> Reported-by: syzbot+37b8770e6d5a8220a039@syzkaller.appspotmail.com
>>
>> IPv6: ADDRCONF(NETDEV_CHANGE): veth0: link becomes ready
>> 8021q: adding VLAN 0 to HW filter on device team0
>> ==================================================================
>> BUG: KASAN: use-after-free in tcf_block_find+0x9d1/0xb90
>> net/sched/cls_api.c:646
>> Read of size 4 at addr ffff8801cc126978 by task syz-executor002/5646
>>
>> CPU: 1 PID: 5646 Comm: syz-executor002 Not tainted 4.19.0-rc5+ #232
>> 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+0x1c4/0x2b4 lib/dump_stack.c:113
>>   print_address_description.cold.8+0x9/0x1ff mm/kasan/report.c:256
>>   kasan_report_error mm/kasan/report.c:354 [inline]
>>   kasan_report.cold.9+0x242/0x309 mm/kasan/report.c:412
>>   __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:432
>>   tcf_block_find+0x9d1/0xb90 net/sched/cls_api.c:646
> 
> Hmm. looks like missing a rcu_dereference() here:
> 
>                 if (!*parent) {
>                         *q = dev->qdisc;
>                         *parent = (*q)->handle;
> 

We hold RTNL here.

Have we already done the changes allowing dev->qdisc being changed
without RTNL being required ?

  reply	other threads:[~2018-09-26 21:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-26 15:44 KASAN: use-after-free Read in tcf_block_find syzbot
2018-09-26 21:44 ` Cong Wang
2018-09-26 21:50   ` Eric Dumazet [this message]
2018-09-26 21:55     ` Cong Wang
2018-09-27  8:06       ` Dmitry Vyukov
2018-09-27  8:10         ` Dmitry Vyukov
2018-09-27 13:00           ` Eric Dumazet
2018-09-27 13:02             ` Dmitry Vyukov
2018-09-27 13:24               ` Eric Dumazet
2018-09-27 13:42                 ` Dmitry Vyukov
2018-09-27 17:50           ` Cong Wang
2018-09-27 18:04             ` Dmitry Vyukov

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=7fcb1c03-6976-9b34-601d-5f50b74c5b0a@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+37b8770e6d5a8220a039@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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).