]> 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)
commit4200c2728d888f281a82342cd25860130cb8e877
tree5a2b59f4ba08ff0488b0088e3be2851ee7cc066f
parent7ac838b3da07974980b8b7a5f5b1f8d0d351eb3b
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: b250e15d5a10 ("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