From: Dan Carpenter <dan.carpenter@oracle•com>
To: Zhen Chen <chenzhen126@huawei•com>
Cc: syzbot <syzbot+2e3efb5eb71cb5075ba7@syzkaller•appspotmail.com>,
davem@davemloft•net, jhs@mojatatu•com, jiri@resnulli•us,
kuba@kernel•org, linux-kernel@vger•kernel.org,
netdev@vger•kernel.org, syzkaller-bugs@googlegroups•com,
xiyou.wangcong@gmail•com
Subject: Re: [syzbot] WARNING: ODEBUG bug in route4_destroy
Date: Tue, 14 Jun 2022 17:46:02 +0300 [thread overview]
Message-ID: <20220614144602.GJ2146@kadam> (raw)
In-Reply-To: <0c0468ae-5fe3-a71f-c987-18475756caca@huawei.com>
On Tue, Jun 14, 2022 at 10:35:44PM +0800, 'Zhen Chen' via syzkaller-bugs wrote:
>
> This looks like route4_destroy is deleting the 'fold' which has been
> freed by tcf_queue_work in route4_change. It means 'fold' is still in
> the table.
> I have tested this patch on syzbot and it works well, but I am not
> sure whether it will introduce other issues...
>
> diff --git a/net/sched/cls_route.c b/net/sched/cls_route.c
> index a35ab8c27866..758c21f9d628 100644
> --- a/net/sched/cls_route.c
> +++ b/net/sched/cls_route.c
> @@ -526,7 +526,7 @@ static int route4_change(struct net *net, struct sk_buff *in_skb,
> rcu_assign_pointer(f->next, f1);
> rcu_assign_pointer(*fp, f);
>
> - if (fold && fold->handle && f->handle != fold->handle) {
> + if (fold && f->handle != fold->handle) {
^^^^^^^^^^^^
There is still a dereference here so your patch doesn't make sense. :/
regards,
dan carpenter
> th = to_hash(fold->handle);
> h = from_hash(fold->handle >> 16);
> b = rtnl_dereference(head->table[th]);
>
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-bugs+unsubscribe@googlegroups•com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-bugs/0c0468ae-5fe3-a71f-c987-18475756caca%40huawei.com.
next prev parent reply other threads:[~2022-06-14 14:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-04 16:46 [syzbot] WARNING: ODEBUG bug in route4_destroy syzbot
2022-06-14 14:35 ` Zhen Chen
2022-06-14 14:46 ` Dan Carpenter [this message]
2022-06-15 11:57 ` Zhen Chen
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=20220614144602.GJ2146@kadam \
--to=dan.carpenter@oracle$(echo .)com \
--cc=chenzhen126@huawei$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=jhs@mojatatu$(echo .)com \
--cc=jiri@resnulli$(echo .)us \
--cc=kuba@kernel$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=syzbot+2e3efb5eb71cb5075ba7@syzkaller$(echo .)appspotmail.com \
--cc=syzkaller-bugs@googlegroups$(echo .)com \
--cc=xiyou.wangcong@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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