android_kernel_samsung_a7y1.../net/sched
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
..
act_api.c net: avoid potential infinite loop in tc_ctl_action() 2020-04-07 09:26:21 +02:00
act_bpf.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
act_connmark.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
act_csum.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
act_gact.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
act_ipt.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
act_mirred.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
act_nat.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
act_pedit.c net/sched: act_pedit: fix WARN() in the traffic path 2020-04-07 12:33:38 +02:00
act_police.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
act_simple.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
act_skbedit.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
act_vlan.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cls_api.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cls_basic.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cls_bpf.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cls_cgroup.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cls_flow.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cls_flower.c net: sched: correct flower port blocking 2020-04-07 14:04:39 +02:00
cls_fw.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cls_route.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cls_rsvp.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cls_rsvp.h cls_rsvp: fix rsvp_policy 2020-04-07 13:49:21 +02:00
cls_rsvp6.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cls_tcindex.c net_sched: fix an OOB access in cls_tcindex 2020-04-07 13:49:25 +02:00
cls_u32.c net: sched: Fix memory exposure from short TCA_U32_SEL 2020-04-07 09:27:10 +02:00
em_canid.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
em_cmp.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
em_ipset.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
em_meta.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
em_nbyte.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
em_text.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
em_u32.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ematch.c net_sched: ematch: reject invalid TCF_EM_SIMPLE 2020-04-07 13:45:58 +02:00
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sch_api.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sch_atm.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sch_blackhole.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sch_cbq.c sch_cbq: validate TCA_CBQ_WRROPT to avoid crash 2020-04-07 08:07:22 +02:00
sch_choke.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sch_codel.c net: sched: Fix a possible null-pointer dereference in dequeue_func() 2020-04-06 20:28:20 +02:00
sch_drr.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sch_dsmark.c sch_dsmark: fix potential NULL deref in dsmark_init() 2020-04-07 08:07:16 +02:00
sch_fifo.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sch_fq_codel.c net/flow_dissector: switch to siphash 2020-04-07 09:29:43 +02:00
sch_fq.c pkt_sched: fq: do not accept silly TCA_FQ_QUANTUM 2020-04-07 13:29:08 +02:00
sch_generic.c net_sched: let qdisc_put() accept NULL pointer 2020-04-06 21:37:13 +02:00
sch_gred.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sch_hfsc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sch_hhf.c net/flow_dissector: switch to siphash 2020-04-07 09:29:43 +02:00
sch_htb.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sch_ingress.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sch_mq.c net: sched: fix tc -s class show no bstats on class with nolock subqueues 2020-04-07 12:43:40 +02:00
sch_mqprio.c net: sched: fix tc -s class show no bstats on class with nolock subqueues 2020-04-07 12:43:40 +02:00
sch_multiq.c net: sched: fix tc -s class show no bstats on class with nolock subqueues 2020-04-07 12:43:40 +02:00
sch_netem.c sch_netem: fix rcu splat in netem_enqueue() 2020-04-07 09:28:38 +02:00
sch_pie.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sch_plug.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sch_prio.c net: sched: fix tc -s class show no bstats on class with nolock subqueues 2020-04-07 12:43:40 +02:00
sch_qfq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sch_red.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sch_sfb.c net/flow_dissector: switch to siphash 2020-04-07 09:29:43 +02:00
sch_sfq.c net/flow_dissector: switch to siphash 2020-04-07 09:29:43 +02:00
sch_tbf.c net: create skb_gso_validate_mac_len() 2020-04-06 18:44:21 +02:00
sch_teql.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30