From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oo1-f69.google.com (mail-oo1-f69.google.com [209.85.161.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E83D32570D for ; Thu, 14 May 2026 02:08:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.69 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778724502; cv=none; b=cqvE9vgfcnmldUMXyPr7dpKO2QtmtdCcit3RjDnE2hkHcgGLdK9dP7E74rHD/F+Hk8xUYFfsFk1aTBQEb2K45jBJH2tX0GwRMgi0Wj1BmhzhHUz4vMd+lFpFjwqq1koJuDtKyqHDg2QJXOF3hvPITQ7eVBRLRiwsZ8ONnFsNkoc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778724502; c=relaxed/simple; bh=R0NXyW7NZezGooN9M2NtWseoxlG4eZQgQguEMyx211U=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=s5o0VTJh+XItK20PdFeF6sh91ZDS5ZY+8hjoI6TCVusXJ4n7b8DfqqNB78WI8gEv+z7CE3aGTZ1GELym0spX3xI3YEgPF5RFLHEqQ2oucs2zdHcVmGs5wYzJdNpUjWYrEsQIW742JCpzON9kLAmTwSDFHkbOWEf8xTWQScm5FLM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.161.69 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-oo1-f69.google.com with SMTP id 006d021491bc7-6947f168159so15642437eaf.2 for ; Wed, 13 May 2026 19:08:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778724500; x=1779329300; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=F62RxkyZ0QF/erU1he9+N0e+F1HqOqZR5aiDBUjrIyw=; b=q7ZEtb/ZNqmHe30HkBE73ciN5AXk/zkFWc61g2VZdaWn2xYiet4sgwgt4LPjnyUkH4 6YtsVuaL9WkOEvgUzL7oqycFvcFqj1Lomj/hDJCAep0HiPZaI/4hekWvnBhPDGGWHigE wHlpHYtE7KH7ng6cH3m6wLo4AWHIegXxg9IN29RC0OMYL89yY+QHLeZ6I/EWbc1f/pBs R1sWzKCvDWYwh0FdT4EqP5vl6vYW53KxcY30twKYi2uIyP6S9kaDFbsvis4VSL150amh y9/z9UvRM5TZtOxjKQMv9AiW+fLpJBpsC43thWcxLsT74GBkwV07+We0LCQTiEkdi3Mm MwrQ== X-Gm-Message-State: AOJu0YxZ8jzgVLnWmUnXGFxt7jgsQbRArUw+p50iUn82cryBnDSqo5/O 80CtnCU0iktF5i+yVmhtiqSCUcRsVb6RZgthzwlkKwJgd1PQL03347eV87Xa9E9Ue+m0KilvZCL 0EdEIylZM4BSk2pOrxAce93kySXCyt9uT7DixO4x+PcFeI2jkZZr47ZVSPZc= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6820:4b0d:b0:694:980a:2c33 with SMTP id 006d021491bc7-69b78d49626mr3284990eaf.5.1778724500161; Wed, 13 May 2026 19:08:20 -0700 (PDT) Date: Wed, 13 May 2026 19:08:20 -0700 In-Reply-To: <6a00e81a.170a0220.1c0296.0218.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <6a052e94.050a0220.d11c8.0000.GAE@google.com> Subject: Forwarded: [syzbot] test [PATCH net v2] ipv6: addrconf: skip autoconf on unregistering devices From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com. *** Subject: [syzbot] test [PATCH net v2] ipv6: addrconf: skip autoconf on unregistering devices Author: raoxu@uniontech.com #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git main From: Xu Rao Date: Tue, 12 May 2026 20:44:10 +0800 Subject: [PATCH net v2] ipv6: addrconf: skip autoconf on unregistering devices syzbot reports that unregister_netdevice() can wait forever for a netdevsim device whose reference count never drops to zero. The leaked reference is held by an IPv6 local route created from addrconf. A late NETDEV_CHANGE notification can still reach addrconf_notify() after the device has entered NETREG_UNREGISTERING. The handler can then run automatic address configuration, add a link-local address and install its host route after unregister teardown has already started. The route nexthop takes a netdev reference in fib6_nh_init(), and there might not be a later ifdown pass to remove the newly created address and route. Do not run MTU, UP or CHANGE based IPv6 autoconfiguration once the device is unregistering. Keep NETDEV_DOWN and NETDEV_UNREGISTER handling unchanged so the teardown path can still remove existing IPv6 state. Reported-by: syzbot+e2af46126e0644cbebdd@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=e2af46126e0644cbebdd Signed-off-by: Xu Rao --- v2: - Drop READ_ONCE() around dev->reg_state. addrconf_notify() is called from the netdevice notifier path, so a plain load is sufficient. - Do not add a Fixes tag. The issue does not appear to be caused by a single commit, but by a long-standing unregister-time lifecycle gap. net/ipv6/addrconf.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 5476b6536eb7..a517e57cf86a 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -3666,6 +3666,9 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, break; case NETDEV_CHANGEMTU: + if (dev->reg_state == NETREG_UNREGISTERING) + break; + /* if MTU under IPV6_MIN_MTU stop IPv6 on this interface. */ if (dev->mtu < IPV6_MIN_MTU) { addrconf_ifdown(dev, dev != net->loopback_dev); @@ -3691,6 +3694,9 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, fallthrough; case NETDEV_UP: case NETDEV_CHANGE: + if (dev->reg_state == NETREG_UNREGISTERING) + break; + if (idev && idev->cnf.disable_ipv6) break; -- 2.50.1