android_kernel_samsung_a7y1.../net
Jason Baron 8595ffe55d net: sched: correct flower port blocking
[ Upstream commit 8a9093c79863b58cc2f9874d7ae788f0d622a596 ]

tc flower rules that are based on src or dst port blocking are sometimes
ineffective due to uninitialized stack data. __skb_flow_dissect() extracts
ports from the skb for tc flower to match against. However, the port
dissection is not done when when the FLOW_DIS_IS_FRAGMENT bit is set in
key_control->flags. All callers of __skb_flow_dissect(), zero-out the
key_control field except for fl_classify() as used by the flower
classifier. Thus, the FLOW_DIS_IS_FRAGMENT may be set on entry to
__skb_flow_dissect(), since key_control is allocated on the stack
and may not be initialized.

Since key_basic and key_control are present for all flow keys, let's
make sure they are initialized.

Fixes: 62230715fd24 ("flow_dissector: do not dissect l4 ports for fragments")
Co-developed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Jason Baron <jbaron@akamai.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-07 14:04:39 +02:00
..
6lowpan 6lowpan: Off by one handling ->nexthdr 2020-04-07 13:41:33 +02:00
9p
802
8021q vlan: fix memory leak in vlan_dev_set_egress_priority 2020-04-07 13:29:16 +02:00
appletalk appletalk: Set error code if register_snap_client failed 2020-04-07 12:46:15 +02:00
atm
ax25
batman-adv batman-adv: Fix DAT candidate selection on little endian systems 2020-04-07 13:38:35 +02:00
bluetooth Bluetooth: delete a stray unlock 2020-04-07 13:24:53 +02:00
bridge netfilter: ebtables: CONFIG_COMPAT: reject trailing data after last rule 2020-04-07 13:41:52 +02:00
caif
can
ceph
core net: fib_rules: Correctly set table field when table number exceeds 8 bits 2020-04-07 14:04:28 +02:00
dcb
dccp dccp: Fix memleak in __feat_register_sp 2020-04-07 13:36:40 +02:00
decnet
dns_resolver
dsa
ethernet net: add annotations on hh->hh_len lockless accesses 2020-04-07 13:25:04 +02:00
hsr net: hsr: fix possible NULL deref in hsr_handle_frame() 2020-04-07 13:49:23 +02:00
ieee802154 inet: frags: call inet_frags_fini() after unregister_pernet_subsys() 2020-04-07 13:42:09 +02:00
ipv4 tcp: clear tp->segs_{in|out} in tcp_disconnect() 2020-04-07 13:49:29 +02:00
ipv6 ipv6: Fix route replacement with dev-only route 2020-04-07 14:04:34 +02:00
ipx
irda
iucv net/af_iucv: always register net_device notifier 2020-04-07 13:42:16 +02:00
key
l2tp
l3mdev
lapb
llc llc: fix sk_buff refcounting in llc_conn_state_process() 2020-04-07 13:43:36 +02:00
mac80211 mac80211: consider more elements in parsing CRC 2020-04-07 14:04:16 +02:00
mac802154
mpls
mptcp
ncm
netfilter netfilter: xt_bpf: add overflow checks 2020-04-07 14:03:39 +02:00
netlabel
netlink
netrom
nfc net: nfc: nci: fix a possible sleep-in-atomic-context bug in nci_uart_tty_receive() 2020-04-07 13:22:15 +02:00
openvswitch
packet packet: fix data-race in fanout_flow_is_huge() 2020-04-07 13:43:55 +02:00
phonet
rds net/rds: Fix 'ib_evt_handler_call' element in 'rds_ib_stat_names' 2020-04-07 13:43:22 +02:00
rfkill rfkill: Fix incorrect check to avoid NULL pointer dereference 2020-04-07 13:28:52 +02:00
rose
rxrpc
sched net: sched: correct flower port blocking 2020-04-07 14:04:39 +02:00
sctp sctp: move the format error check out of __sctp_sf_do_9_1_abort 2020-04-07 14:04:36 +02:00
sunrpc sunrpc: expiry_time should be seconds not timeval 2020-04-07 13:50:16 +02:00
switchdev
tipc tipc: set sysctl_tipc_rmem and named_timeout right range 2020-04-07 13:41:27 +02:00
unix
vmw_vsock
wimax
wireless cfg80211: add missing policy for NL80211_ATTR_STATUS_CODE 2020-04-07 14:04:22 +02:00
x25 net/x25: fix nonblocking connect 2020-04-07 13:45:13 +02:00
xfrm
compat.c
Kconfig
Makefile
socket.c compat_ioctl: handle SIOCOUTQNSD 2020-04-07 13:37:06 +02:00
sysctl_net.c