linux_dsm_epyc7002/drivers/net/wan
Alexey Khoroshilov 19eeb2f9e7 farsync: fix invalid memory accesses in fst_add_one() and fst_init_card()
There are several issues in fst_add_one() and fst_init_card():
- invalid pointer dereference at card->ports[card->nports - 1] if
  register_hdlc_device() fails for the first port in fst_init_card();
- fst_card_array overflow at fst_card_array[no_of_cards_added]
  because there is no checks for array overflow;
- use after free because pointer to deallocated card is left in fst_card_array
  if something fails after fst_card_array[no_of_cards_added] = card;
- several leaks on failure paths in fst_add_one().

The patch fixes all the issues and makes code more readable.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-07-11 13:34:48 -07:00
..
lmc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-01-25 11:17:34 -08:00
.gitignore
c101.c drivers/net: Remove unnecessary k.alloc/v.alloc OOM messages 2012-01-31 16:20:21 -05:00
cosa.c driver/net: cosa driver uses udelay incorrectly 2014-04-15 00:08:22 -04:00
cosa.h
dlci.c wan: dlci: Remove unused netdev_priv pointer 2014-02-09 18:40:56 -08:00
dscc4.c wan: dscc4: remove unnecessary pci_set_drvdata() 2013-12-09 18:09:29 -05:00
farsync.c farsync: fix invalid memory accesses in fst_add_one() and fst_init_card() 2014-07-11 13:34:48 -07:00
farsync.h
hd64570.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
hd64570.h net: Spelling s/transmition/transmission/ 2014-01-14 17:11:26 -08:00
hd64572.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
hd64572.h net: Spelling s/transmition/transmission/ 2014-01-14 17:11:26 -08:00
hdlc_cisco.c
hdlc_fr.c net: replace random_ether_addr() with eth_hw_addr_random() 2012-02-15 15:34:16 -05:00
hdlc_ppp.c
hdlc_raw_eth.c net: replace random_ether_addr() with eth_hw_addr_random() 2012-02-15 15:34:16 -05:00
hdlc_raw.c
hdlc_x25.c
hdlc.c net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
hostess_sv11.c net: wan: remove deprecated IRQF_DISABLED 2013-10-07 15:53:52 -04:00
ixp4xx_hss.c net: wan: remove unnecessary platform_set_drvdata() 2013-05-27 22:34:52 -07:00
Kconfig tty/serial patches for 3.9-rc1 2013-02-21 13:41:04 -08:00
lapbether.c net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
Makefile wanrouter: completely decouple obsolete code from kernel. 2013-01-31 19:20:33 -05:00
n2.c drivers/net: Remove unnecessary k.alloc/v.alloc OOM messages 2012-01-31 16:20:21 -05:00
pc300too.c wan: pc300too: remove unnecessary pci_set_drvdata() 2013-12-09 18:09:29 -05:00
pci200syn.c wan: pci200syn: remove unnecessary pci_set_drvdata() 2013-12-09 18:09:29 -05:00
sbni.c drivers: net: Include new header file in sbni.c 2013-12-19 18:51:20 -05:00
sbni.h
sdla.c drivers/net/wan: delete unneeded call to netdev_priv 2014-05-15 16:57:47 -04:00
sealevel.c net: wan: remove deprecated IRQF_DISABLED 2013-10-07 15:53:52 -04:00
wanxl.c wan: wanxl: remove unnecessary pci_set_drvdata() 2013-12-09 18:09:29 -05:00
wanxl.h
wanxlfw.inc_shipped
wanxlfw.S Fix the wanxl firmware to include missing constants 2012-11-09 16:28:37 -05:00
x25_asy.c wan: Remove unnecessary alloc/OOM messages 2013-02-04 13:22:34 -05:00
x25_asy.h wan: Remove extern from function prototypes 2013-09-24 16:40:19 -07:00
z85230.c sections: fix section conflicts in drivers/net/wan 2012-10-06 03:04:43 +09:00
z85230.h wan: Remove extern from function prototypes 2013-09-24 16:40:19 -07:00