linux-stable/drivers/net
Florian Fainelli bc69709c54 net: dsa: bcm_sf2: Fix overflow checks
commit d0802dc411 upstream.

Commit f949a12fd6 ("net: dsa: bcm_sf2: fix buffer overflow doing
set_rxnfc") tried to fix the some user controlled buffer overflows in
bcm_sf2_cfp_rule_set() and bcm_sf2_cfp_rule_del() but the fix was using
CFP_NUM_RULES, which while it is correct not to overflow the bitmaps, is
not representative of what the device actually supports. Correct that by
using bcm_sf2_cfp_rule_size() instead.

The latter subtracts the number of rules by 1, so change the checks from
greater than or equal to greater than accordingly.

Fixes: f949a12fd6 ("net: dsa: bcm_sf2: fix buffer overflow doing set_rxnfc")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-23 10:36:42 +02:00
..
appletalk
arcnet
bonding bonding/alb: make sure arp header is pulled before accessing it 2020-03-18 07:17:42 +01:00
caif
can slcan: Don't transmit uninitialized stack data in padding 2020-04-13 10:48:05 +02:00
dsa net: dsa: bcm_sf2: Fix overflow checks 2020-04-23 10:36:42 +02:00
ethernet net/mlx5e: Enforce setting of a single FEC mode 2020-04-23 10:36:28 +02:00
fddi
fjes fjes: fix missed check in fjes_acpi_add 2019-12-31 16:41:14 +01:00
hamradio 6pack,mkiss: fix possible deadlock 2020-01-04 19:18:36 +01:00
hippi
hyperv hv_netvsc: Fix unwanted wakeup in netvsc_attach() 2020-03-05 16:43:46 +01:00
ieee802154
ipvlan ipvlan: don't deref eth hdr before checking it's set 2020-03-18 07:17:39 +01:00
netdevsim netdevsim: fix stack-out-of-bounds in nsim_dev_debugfs_init() 2020-02-11 04:35:06 -08:00
phy net: phy: micrel: use genphy_read_status for KSZ9131 2020-04-21 09:04:46 +02:00
plip
ppp ppp: Adjust indentation into ppp_async_input 2020-02-11 04:35:46 -08:00
slip slip: not call free_netdev before rtnl_unlock in slip_open 2020-03-21 08:11:53 +01:00
team team: add missing attribute validation for array index 2020-03-18 07:17:45 +01:00
usb net: qmi_wwan: add support for ASKEY WWHC050 2020-04-01 11:01:36 +02:00
vmxnet3
wan wan: ixp4xx_hss: fix compile-testing on 64-bit 2020-02-24 08:36:46 +01:00
wimax
wireless mac80211_hwsim: Use kstrndup() in place of kasprintf() 2020-04-21 09:05:00 +02:00
xen-netback
dummy.c
eql.c
geneve.c geneve: move debug check after netdev unregister 2020-04-01 11:01:31 +02:00
gtp.c gtp: use __GFP_NOWARN to avoid memalloc warning 2020-02-11 04:35:04 -08:00
ifb.c net: Fix CONFIG_NET_CLS_ACT=n and CONFIG_NFT_FWD_NETDEV={y, m} build 2020-04-01 11:02:18 +02:00
Kconfig net: Fix CONFIG_NET_CLS_ACT=n and CONFIG_NFT_FWD_NETDEV={y, m} build 2020-04-01 11:02:18 +02:00
LICENSE.SRC
loopback.c
macsec.c macsec: restrict to ethernet devices 2020-04-01 11:01:32 +02:00
macvlan.c macvlan: add cond_resched() during multicast processing 2020-03-18 07:17:39 +01:00
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c net: tun: record RX queue in skb before do_xdp_generic() 2020-04-21 09:04:48 +02:00
veth.c
virtio_net.c
vrf.c
vsockmon.c
vxlan.c vxlan: check return value of gro_cells_init() 2020-04-01 11:01:39 +02:00
xen-netfront.c