[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250729081109.3381-1-hdanton@sina.com>
Date: Tue, 29 Jul 2025 16:11:08 +0800
From: Hillf Danton <hdanton@...a.com>
To: syzbot <syzbot+6641a61fe0e2e89ae8c5@...kaller.appspotmail.com>
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [net?] WARNING in xfrm_state_fini (3)
> Date: Tue, 29 Jul 2025 00:08:31 -0700 [thread overview]
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 038d61fd6422 Linux 6.16
> git tree: upstream
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=11b88cf0580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=4066f1c76cfbc4fe
> dashboard link: https://syzkaller.appspot.com/bug?extid=6641a61fe0e2e89ae8c5
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16ca1782580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=140194a2580000
#syz test
--- x/net/xfrm/xfrm_state.c
+++ y/net/xfrm/xfrm_state.c
@@ -615,6 +615,15 @@ static void xfrm_state_gc_destroy(struct
put_page(x->xfrag.page);
xfrm_dev_state_free(x);
security_xfrm_state_free(x);
+ spin_lock_bh(&x->lock);
+ do {
+ struct net *net = xs_net(x);
+
+ spin_lock(&net->xfrm.xfrm_state_lock);
+ list_del_init(&x->km.all);
+ spin_unlock(&net->xfrm.xfrm_state_lock);
+ } while (0);
+ spin_unlock_bh(&x->lock);
xfrm_state_free(x);
}
@@ -816,7 +825,7 @@ int __xfrm_state_delete(struct xfrm_stat
x->km.state = XFRM_STATE_DEAD;
spin_lock(&net->xfrm.xfrm_state_lock);
- list_del(&x->km.all);
+ list_del_init(&x->km.all);
hlist_del_rcu(&x->bydst);
hlist_del_rcu(&x->bysrc);
if (x->km.seq)
--
Powered by blists - more mailing lists