From: Dharanitharan R <dharanitharan725@gmail.com>
To: syzbot+422806e5f4cce722a71f@syzkaller.appspotmail.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
dharanitharan725@gmail.com
Subject: [PATCH net v2] team: fix qom_list corruption by using list_del_init_rcu()
Date: Wed, 10 Dec 2025 05:31:05 +0000 [thread overview]
Message-ID: <20251210053104.23608-2-dharanitharan725@gmail.com> (raw)
In __team_queue_override_port_del(), repeated deletion of the same port
using list_del_rcu() could corrupt the RCU-protected qom_list. This
happens if the function is called multiple times on the same port, for
example during port removal or team reconfiguration.
This patch replaces list_del_rcu() with list_del_init_rcu() to:
- Ensure safe repeated deletion of the same port
- Keep the RCU list consistent
- Avoid potential use-after-free and list corruption issues
Testing:
- Syzbot-reported crash is eliminated in testing.
- Kernel builds and runs cleanly
Fixes: 108f9405ce81 ("team: add queue override configuration mechanism")
Reported-by: syzbot+422806e5f4cce722a71f@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=422806e5f4cce722a71f
Signed-off-by: Dharanitharan R <dharanitharan725@gmail.com>
---
drivers/net/team/team_core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/team/team_core.c b/drivers/net/team/team_core.c
index 4d5c9ae8f221..d6d724b52dbf 100644
--- a/drivers/net/team/team_core.c
+++ b/drivers/net/team/team_core.c
@@ -823,7 +823,8 @@ static void __team_queue_override_port_del(struct team *team,
{
if (!port->queue_id)
return;
- list_del_rcu(&port->qom_list);
+ /* Ensure safe repeated deletion */
+ list_del_init_rcu(&port->qom_list);
}
static bool team_queue_override_port_has_gt_prio_than(struct team_port *port,
--
2.43.0
next reply other threads:[~2025-12-10 5:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-10 5:31 Dharanitharan R [this message]
2025-12-10 12:51 ` [PATCH net v2] team: fix qom_list corruption by using list_del_init_rcu() Simon Horman
2025-12-11 9:38 ` Jiri Pirko
2025-12-11 9:38 ` syzbot
2025-12-11 16:14 ` Simon Horman
2025-12-12 10:11 ` Jiri Pirko
2025-12-16 5:20 ` kernel test robot
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=20251210053104.23608-2-dharanitharan725@gmail.com \
--to=dharanitharan725@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=syzbot+422806e5f4cce722a71f@syzkaller.appspotmail.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;
as well as URLs for NNTP newsgroup(s).