Commit deb7178e authored by Pavel Skripkin's avatar Pavel Skripkin Committed by David S. Miller

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: 61414f5e ("FDDI: defza: Add support for DEC FDDIcontroller 700
TURBOchannel adapter")
Signed-off-by: default avatarPavel Skripkin <paskripkin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b0b33b04
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment