[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aTls21jR6BvTaV-k@horms.kernel.org>
Date: Wed, 10 Dec 2025 12:51:39 +0000
From: Simon Horman <horms@...nel.org>
To: Dharanitharan R <dharanitharan725@...il.com>
Cc: syzbot+422806e5f4cce722a71f@...kaller.appspotmail.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net v2] team: fix qom_list corruption by using
list_del_init_rcu()
On Wed, Dec 10, 2025 at 05:31:05AM +0000, Dharanitharan R wrote:
> 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@...kaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=422806e5f4cce722a71f
> Signed-off-by: Dharanitharan R <dharanitharan725@...il.com>
Thanks for addressing my review of v1.
The commit message looks much better to me.
However, I am unable to find the cited commit in net.
And I am still curious about the cause: are you sure it is repeated deletion?
> ---
> 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);
When applied against net this does not compile
as list_del_init_rcu (as opposed to hlist_del_init_rcu) does
not seem to exist in that tree. Am I missing something?
> }
>
> static bool team_queue_override_port_has_gt_prio_than(struct team_port *port,
> --
> 2.43.0
--
pw-bot: changes-requested
Powered by blists - more mailing lists