diff options
author | Pavel Skripkin <paskripkin@gmail.com> | 2021-07-09 17:09:53 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-07-09 21:01:01 +0300 |
commit | c78eaeebe855fd93f2e77142ffd0404a54070d84 (patch) | |
tree | 417e6a280a7c901151ca223b6c1d224e3277acac /drivers/net/ethernet/qualcomm | |
parent | 2b452550a203d88112eaf0ba9fc4b750a000b496 (diff) | |
download | linux-c78eaeebe855fd93f2e77142ffd0404a54070d84.tar.xz |
net: moxa: fix UAF in moxart_mac_probe
In case of netdev registration failure the code path will
jump to init_fail label:
init_fail:
netdev_err(ndev, "init failed\n");
moxart_mac_free_memory(ndev);
irq_map_fail:
free_netdev(ndev);
return ret;
So, there is no need to call free_netdev() before jumping
to error handling path, since it can cause UAF or double-free
bug.
Fixes: 6c821bd9edc9 ("net: Add MOXA ART SoCs ethernet driver")
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qualcomm')
0 files changed, 0 insertions, 0 deletions