]> git.baikalelectronics.ru Git - kernel.git/commit
net: fddi: fix UAF in fza_probe
authorPavel Skripkin <paskripkin@gmail.com>
Tue, 13 Jul 2021 10:58:53 +0000 (13:58 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Jul 2021 16:43:50 +0000 (09:43 -0700)
commitdeb7178eb940e2c5caca1b1db084a69b2e59b4c9
tree5a2b59f4ba08ff0488b0088e3be2851ee7cc066f
parentb0b33b048dcfbd7da82c3cde4fab02751dfab4d6
net: fddi: fix UAF in fza_probe

fp is netdev private data and it cannot be
used after free_netdev() call. Using fp after free_netdev()
can cause UAF bug. Fix it by moving free_netdev() after error message.

Fixes: 61414f5ec983 ("FDDI: defza: Add support for DEC FDDIcontroller 700
TURBOchannel adapter")
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/fddi/defza.c