mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
net: ti: fix UAF in tlan_remove_one
commit0336f8ffec
upstream. priv is netdev private data and it cannot be used after free_netdev() call. Using priv after free_netdev() can cause UAF bug. Fix it by moving free_netdev() at the end of the function. Fixes:1e0a8b13d3
("tlan: cancel work at remove path") Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b1e0913319
commit
0538b0ab7d
1 changed files with 1 additions and 2 deletions
|
@ -313,9 +313,8 @@ static void tlan_remove_one(struct pci_dev *pdev)
|
|||
pci_release_regions(pdev);
|
||||
#endif
|
||||
|
||||
free_netdev(dev);
|
||||
|
||||
cancel_work_sync(&priv->tlan_tqueue);
|
||||
free_netdev(dev);
|
||||
}
|
||||
|
||||
static void tlan_start(struct net_device *dev)
|
||||
|
|
Loading…
Reference in a new issue