linux_dsm_epyc7002/drivers/net/dsa
Dan Carpenter 8d6ea93285 net: dsa: bcm_sf2: potential array overflow in bcm_sf2_sw_suspend()
The value of ->num_ports comes from bcm_sf2_sw_probe() and it is less
than or equal to DSA_MAX_PORTS.  The ds->ports[] array is used inside
the dsa_is_user_port() and dsa_is_cpu_port() functions.  The ds->ports[]
array is allocated in dsa_switch_alloc() and it has ds->num_ports
elements so this leads to a static checker warning about a potential out
of bounds read.

Fixes: 8cfa94984c ("net: dsa: bcm_sf2: add suspend/resume callbacks")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Vivien Didelot <vivien.didelot@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-13 22:11:53 -08:00
..
b53 net: dsa: b53: Fix for failure when irq is not defined in dt 2019-02-07 18:18:37 -08:00
microchip net: dsa: microchip: Drop unused GPIO includes 2019-01-04 12:58:25 -08:00
mv88e6xxx dsa: mv88e6xxx: Ensure all pending interrupts are handled prior to exit 2019-02-13 20:46:38 -08:00
bcm_sf2_cfp.c net: dsa: bcm_sf2: fix semicolon.cocci warnings 2018-11-07 22:14:05 -08:00
bcm_sf2_regs.h
bcm_sf2.c net: dsa: bcm_sf2: potential array overflow in bcm_sf2_sw_suspend() 2019-02-13 22:11:53 -08:00
bcm_sf2.h net: dsa: bcm_sf2: Restore CFP rules during system resume 2018-11-06 15:05:22 -08:00
dsa_loop_bdinfo.c
dsa_loop.c
dsa_loop.h
Kconfig net: dsa: lantiq_gswip: Depend on HAS_IOMEM 2018-09-25 20:27:43 -07:00
lan9303_i2c.c
lan9303_mdio.c
lan9303-core.c
lan9303.h
lantiq_gswip.c net: dsa: lantiq_gswip: Minor code style improvements 2018-09-17 08:12:11 -07:00
lantiq_pce.h net: dsa: Add Lantiq / Intel DSA driver for vrx200 2018-09-13 08:14:33 -07:00
Makefile net: dsa: Add Lantiq / Intel DSA driver for vrx200 2018-09-13 08:14:33 -07:00
mt7530.c net: dsa: mt7530: Drop unused GPIO include 2019-01-04 13:07:23 -08:00
mt7530.h
mv88e6060.c mv88e6060: disable hardware level MAC learning 2018-12-03 16:04:21 -08:00
mv88e6060.h
qca8k.c net: dsa: qca8k: simplify getting .driver_data 2018-10-21 21:10:11 -07:00
qca8k.h
realtek-smi.c net: dsa: realtek-smi: fix OF child-node lookup 2019-01-17 14:04:49 -08:00
realtek-smi.h
rtl8366.c
rtl8366rb.c
vitesse-vsc73xx.c