From: David M. <da...@da...> - 2019-03-26 18:22:25
|
From: Xin Long <luc...@gm...> Date: Sun, 24 Mar 2019 00:48:22 +0800 > When running a syz script, a panic occurred: ... > It was caused by the netns freed without deleting the discoverer timer, > while later on the netns would be accessed in the timer handler. > > The timer should have been deleted by tipc_net_stop() when cleaning up a > netns. However, tipc has been able to enable a bearer and start d->timer > without the local node_addr set since Commit 52dfae5c85a4 ("tipc: obtain > node identity from interface by default"), which caused the timer not to > be deleted in tipc_net_stop() then. > > So fix it in tipc_net_stop() by changing to check local node_id instead > of local node_addr, as Jon suggested. > > While at it, remove the calling of tipc_nametbl_withdraw() there, since > tipc_nametbl_stop() will take of the nametbl's freeing after. > > Fixes: 52dfae5c85a4 ("tipc: obtain node identity from interface by default") > Reported-by: syz...@sy... > Signed-off-by: Xin Long <luc...@gm...> Applied and queued up for -stable, anks Xin! |