mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-07 21:53:44 +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: 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:
parent
b0b33b048d
commit
deb7178eb9
@ -1504,9 +1504,8 @@ static int fza_probe(struct device *bdev)
|
||||
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…
Reference in New Issue
Block a user