mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-12 08:09:56 +00:00
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>
This commit is contained in:
parent
b0b33b048d
commit
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user