[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191102235350.GB417753@t480s.localdomain>
Date: Sat, 2 Nov 2019 23:53:50 -0400
From: Vivien Didelot <vivien.didelot@...il.com>
To: Florian Fainelli <f.fainelli@...il.com>
Cc: netdev@...r.kernel.org, rmk+kernel@...linux.org.uk,
hkallweit1@...il.com, Florian Fainelli <f.fainelli@...il.com>,
Andrew Lunn <andrew@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] net: dsa: Fix use after free in
dsa_switch_remove()
On Sat, 2 Nov 2019 20:13:26 -0700, Florian Fainelli <f.fainelli@...il.com> wrote:
> The order in which the ports are deleted from the list and freed and the
> call to dsa_tree_remove_switch() is done is reversed, which leads to an
s/dsa_tree_remove_switch/dsa_switch_remove/
> use after free condition. Reverse the two: first tear down the ports and
> switch from the fabric, then free the ports associated with that switch
> fabric.
>
> Fixes: 05f294a85235 ("net: dsa: allocate ports on touch")
> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
Thanks for reporting and fixing this!
Reviewed-by: Vivien Didelot <vivien.didelot@...il.com>
Powered by blists - more mailing lists