Re: [syzbot] [net?] WARNING: refcount bug in ethnl_phy_done

From: Eric Dumazet
Date: Wed Sep 11 2024 - 06:10:12 EST


On Wed, Sep 11, 2024 at 12:04 PM Maxime Chevallier
<maxime.chevallier@xxxxxxxxxxx> wrote:
>
> Hi,
>
> On Wed, 11 Sep 2024 01:00:23 -0700
> syzbot <syzbot+e9ed4e4368d450c8f9db@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> > Hello,
> >
> > syzbot found the following issue on:
> >
> > HEAD commit: a9b1fab3b69f Merge branch 'ionic-convert-rx-queue-buffers-..
> > git tree: net-next
> > console+strace: https://syzkaller.appspot.com/x/log.txt?x=1193c49f980000
> > kernel config: https://syzkaller.appspot.com/x/.config?x=37742f4fda0d1b09
> > dashboard link: https://syzkaller.appspot.com/bug?extid=e9ed4e4368d450c8f9db
> > compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14bb7bc7980000
> > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17b0a100580000
> >
> > Downloadable assets:
> > disk image: https://storage.googleapis.com/syzbot-assets/0459f959b12d/disk-a9b1fab3.raw.xz
> > vmlinux: https://storage.googleapis.com/syzbot-assets/337f1be5353b/vmlinux-a9b1fab3.xz
> > kernel image: https://storage.googleapis.com/syzbot-assets/0e3701969c4a/bzImage-a9b1fab3.xz
> >
> > The issue was bisected to:
> >
> > commit 17194be4c8e1e82d8b484e58cdcb495c0714d1fd
> > Author: Maxime Chevallier <maxime.chevallier@xxxxxxxxxxx>
> > Date: Wed Aug 21 15:10:01 2024 +0000
> >
> > net: ethtool: Introduce a command to list PHYs on an interface
> >
> > bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1034a49f980000
> > final oops: https://syzkaller.appspot.com/x/report.txt?x=1234a49f980000
> > console output: https://syzkaller.appspot.com/x/log.txt?x=1434a49f980000
> >
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: syzbot+e9ed4e4368d450c8f9db@xxxxxxxxxxxxxxxxxxxxxxxxx
> > Fixes: 17194be4c8e1 ("net: ethtool: Introduce a command to list PHYs on an interface")
>
> I'm currently investigating this. I couldn't reproduce it though, even
> with the C reproducer, although this was on an arm64 box. I'll give it
> a try on x86_64 with the provided .config, see if I can figure out
> what's going on, as it looks like the ethnl_phy_start() doesn't get
> called.

Make sure to have in your .config

CONFIG_REF_TRACKER=y
CONFIG_NET_DEV_REFCNT_TRACKER=y
CONFIG_NET_NS_REFCNT_TRACKER=y