android_kernel_oneplus_msm8998/net/sched
Cong Wang 749cbfc0ad net_sched: refetch skb protocol for each filter
[ Upstream commit cd0c4e70fc0ccfa705cdf55efb27519ce9337a26 ]

Martin reported a set of filters don't work after changing
from reclassify to continue. Looking into the code, it
looks like skb protocol is not always fetched for each
iteration of the filters. But, as demonstrated by Martin,
TC actions could modify skb->protocol, for example act_vlan,
this means we have to refetch skb protocol in each iteration,
rather than using the one we fetch in the beginning of the loop.

This bug is _not_ introduced by commit 3b3ae88026
("net: sched: consolidate tc_classify{,_compat}"), technically,
if act_vlan is the only action that modifies skb protocol, then
it is commit c7e2b9689e ("sched: introduce vlan action") which
introduced this bug.

Reported-by: Martin Olsson <martin.olsson+netdev@sentorsecurity.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-06 19:43:03 +01:00
..
act_api.c
act_bpf.c
act_connmark.c
act_csum.c
act_gact.c
act_ipt.c
act_mirred.c
act_nat.c
act_pedit.c
act_police.c
act_simple.c
act_skbedit.c
act_vlan.c
cls_api.c
cls_basic.c
cls_bpf.c
cls_cgroup.c
cls_flow.c
cls_flower.c
cls_fw.c
cls_route.c
cls_rsvp.c
cls_rsvp.h
cls_rsvp6.c
cls_tcindex.c net_sched: fix NULL pointer dereference when delete tcindex filter 2018-08-22 07:48:35 +02:00
cls_u32.c
em_canid.c
em_cmp.c
em_ipset.c
em_meta.c
em_nbyte.c
em_text.c
em_u32.c
ematch.c
Kconfig
Makefile
sch_api.c net_sched: refetch skb protocol for each filter 2019-02-06 19:43:03 +01:00
sch_atm.c
sch_blackhole.c
sch_cbq.c
sch_choke.c
sch_codel.c
sch_drr.c
sch_dsmark.c
sch_fifo.c
sch_fq.c
sch_fq_codel.c
sch_generic.c
sch_gred.c net: sched: gred: pass the right attribute to gred_change_table_def() 2018-11-10 07:41:41 -08:00
sch_hfsc.c
sch_hhf.c sch_hhf: fix null pointer dereference on init failure 2018-09-15 09:40:41 +02:00
sch_htb.c sch_htb: fix crash on init failure 2018-09-15 09:40:41 +02:00
sch_ingress.c
sch_mq.c
sch_mqprio.c
sch_multiq.c sch_multiq: fix double free on init failure 2018-09-15 09:40:41 +02:00
sch_netem.c net: Prevent invalid access to skb->prev in __qdisc_drop_all 2018-12-17 21:55:09 +01:00
sch_pie.c
sch_plug.c
sch_prio.c
sch_qfq.c
sch_red.c sch_red: update backlog as well 2018-11-10 07:41:37 -08:00
sch_sfb.c
sch_sfq.c
sch_tbf.c sch_tbf: fix two null pointer dereferences on init failure 2018-09-15 09:40:42 +02:00
sch_teql.c