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: 61414f5ec9
("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>
This commit is contained in:
Родитель
b0b33b048d
Коммит
deb7178eb9
|
@ -1504,9 +1504,8 @@ err_out_resource:
|
|||
release_mem_region(start, len);
|
||||
|
||||
err_out_kfree:
|
||||
free_netdev(dev);
|
||||
|
||||
pr_err("%s: initialization failure, aborting!\n", fp->name);
|
||||
free_netdev(dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче