]> git.baikalelectronics.ru Git - kernel.git/commit
ethernet: ucc_geth: fix use-after-free in ucc_geth_remove()
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Fri, 18 Dec 2020 10:55:38 +0000 (11:55 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 22 Dec 2020 01:29:43 +0000 (17:29 -0800)
commit5b094ebb824aba7a859d4bcac7af7ac7a9a83b1e
treeaa1e36816a2dea2c5d438944bc4930fea0160208
parent77a26639d56a25246487cf8ddf48b4fdae2a9c0c
ethernet: ucc_geth: fix use-after-free in ucc_geth_remove()

ugeth is the netdiv_priv() part of the netdevice. Accessing the memory
pointed to by ugeth (such as done by ucc_geth_memclean() and the two
of_node_puts) after free_netdev() is thus use-after-free.

Fixes: 36bb1d2390c5 ("ucc_geth: fix module removal")
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/ucc_geth.c