[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aTB5nBUI6a3YBRlr@horms.kernel.org>
Date: Wed, 3 Dec 2025 17:55:40 +0000
From: Simon Horman <horms@...nel.org>
To: Petr Machata <petrm@...dia.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Andrew Lunn <andrew+netdev@...n.ch>, netdev@...r.kernel.org,
Ido Schimmel <idosch@...dia.com>, mlxsw@...dia.com,
Jiri Pirko <jiri@...nulli.us>
Subject: Re: [PATCH net 3/3] mlxsw: spectrum_mr: Fix use-after-free when
updating multicast route stats
On Tue, Dec 02, 2025 at 06:44:13PM +0100, Petr Machata wrote:
> From: Ido Schimmel <idosch@...dia.com>
>
> Cited commit added a dedicated mutex (instead of RTNL) to protect the
> multicast route list, so that it will not change while the driver
> periodically traverses it in order to update the kernel about multicast
> route stats that were queried from the device.
>
> One instance of list entry deletion (during route replace) was missed
> and it can result in a use-after-free [1].
>
> Fix by acquiring the mutex before deleting the entry from the list and
> releasing it afterwards.
...
> Fixes: f38656d06725 ("mlxsw: spectrum_mr: Protect multicast route list with a lock")
> Signed-off-by: Ido Schimmel <idosch@...dia.com>
> Reviewed-by: Petr Machata <petrm@...dia.com>
> Signed-off-by: Petr Machata <petrm@...dia.com>
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists