[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191031092338.79831fa7@cakuba.netronome.com>
Date: Thu, 31 Oct 2019 09:23:38 -0700
From: Jakub Kicinski <jakub.kicinski@...ronome.com>
To: Ido Schimmel <idosch@...sch.org>
Cc: netdev@...r.kernel.org, davem@...emloft.net, jiri@...lanox.com,
sfr@...b.auug.org.au, mlxsw@...lanox.com,
Ido Schimmel <idosch@...lanox.com>
Subject: Re: [PATCH net] netdevsim: Fix use-after-free during device
dismantle
On Thu, 31 Oct 2019 18:20:30 +0200, Ido Schimmel wrote:
> From: Ido Schimmel <idosch@...lanox.com>
>
> Commit da58f90f11f5 ("netdevsim: Add devlink-trap support") added
> delayed work to netdevsim that periodically iterates over the registered
> netdevsim ports and reports various packet traps via devlink.
>
> While the delayed work takes the 'port_list_lock' mutex to protect
> against concurrent addition / deletion of ports, during device creation
> / dismantle ports are added / deleted without this lock, which can
> result in a use-after-free [1].
>
> Fix this by making sure that the ports list is always modified under the
> lock.
Acked-by: Jakub Kicinski <jakub.kicinski@...ronome.com>
Powered by blists - more mailing lists