mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+6641a61fe0e2e89ae8c5@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [net?] WARNING in xfrm_state_fini (3)
Date: Tue, 29 Jul 2025 16:11:08 +0800	[thread overview]
Message-ID: <20250729081109.3381-1-hdanton@sina.com> (raw)
In-Reply-To: <6888736f.a00a0220.b12ec.00ca.GAE@google.com>

> 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)
--

  reply	other threads:[~2025-07-29  8:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-29  7:08 syzbot
2025-07-29  8:11 ` Hillf Danton [this message]
2025-07-29  9:05   ` syzbot
2025-07-29 11:01 ` Steffen Klassert
2025-07-29 11:09   ` Sabrina Dubroca
2025-07-29 18:47     ` syzbot
2025-08-28 11:06     ` Tetsuo Handa
2025-08-29  8:57       ` Sabrina Dubroca
2025-08-01  0:54 ` syzbot
     [not found] <aIiYARi_eBdMAIhd@gauss3.secunet.de>
2025-07-29  9:44 ` syzbot
     [not found] <aIiaPZa_jHAiuATa@gauss3.secunet.de>
2025-07-29  9:54 ` syzbot

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=20250729081109.3381-1-hdanton@sina.com \
    --to=hdanton@sina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+6641a61fe0e2e89ae8c5@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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

all inboxes | Powered by JetHome®