]> 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)
commita9838885d26cd0056ccc54249a58d82f87cfb2e4
treeaa1e36816a2dea2c5d438944bc4930fea0160208
parente6c4488268890fe21859c4981dc6343913656034
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