android_kernel_xiaomi_sm8350/net/sched
Cong Wang 93e794d4fe net_sched: reject TCF_EM_SIMPLE case for complex ematch module
[ Upstream commit 9cd3fd2054c3b3055163accbf2f31a4426f10317 ]

When TCF_EM_SIMPLE was introduced, it is supposed to be convenient
for ematch implementation:

https://lore.kernel.org/all/20050105110048.GO26856@postel.suug.ch/

"You don't have to, providing a 32bit data chunk without TCF_EM_SIMPLE
set will simply result in allocating & copy. It's an optimization,
nothing more."

So if an ematch module provides ops->datalen that means it wants a
complex data structure (saved in its em->data) instead of a simple u32
value. We should simply reject such a combination, otherwise this u32
could be misinterpreted as a pointer.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Reported-and-tested-by: syzbot+4caeae4c7103813598ae@syzkaller.appspotmail.com
Reported-by: Jun Nie <jun.nie@linaro.org>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Cong Wang <cong.wang@bytedance.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-18 11:41:33 +01:00
..
act_api.c net/sched: act_api: Notify user space if any actions were flushed before error 2022-07-07 17:36:50 +02:00
act_bpf.c
act_connmark.c
act_csum.c
act_ct.c
act_ctinfo.c
act_gact.c
act_ife.c
act_ipt.c
act_meta_mark.c
act_meta_skbprio.c
act_meta_skbtcindex.c
act_mirred.c
act_mpls.c
act_nat.c
act_pedit.c net/sched: act_pedit: sanitize shift argument before usage 2022-05-25 09:14:35 +02:00
act_police.c net/sched: act_police: more accurate MTU policing 2022-06-22 14:11:24 +02:00
act_sample.c
act_simple.c
act_skbedit.c
act_skbmod.c
act_tunnel_key.c
act_vlan.c
cls_api.c net: sched: fix possible refcount leak in tc_new_tfilter() 2022-09-28 11:04:07 +02:00
cls_basic.c
cls_bpf.c
cls_cgroup.c
cls_flow.c
cls_flower.c
cls_fw.c
cls_matchall.c
cls_route.c net_sched: cls_route: disallow handle of 0 2022-08-25 11:18:18 +02:00
cls_rsvp6.c
cls_rsvp.c
cls_rsvp.h
cls_tcindex.c
cls_u32.c net/sched: cls_u32: fix possible leak in u32_init_knode() 2022-04-27 13:50:47 +02:00
em_canid.c
em_cmp.c
em_ipset.c
em_ipt.c
em_meta.c
em_nbyte.c
em_text.c
em_u32.c
ematch.c net_sched: reject TCF_EM_SIMPLE case for complex ematch module 2023-01-18 11:41:33 +01:00
Kconfig
Makefile
sch_api.c
sch_atm.c
sch_blackhole.c
sch_cake.c net: sched: cake: fix null pointer access issue when cake_init() fails 2022-10-29 10:20:35 +02:00
sch_cbq.c
sch_cbs.c
sch_choke.c
sch_codel.c
sch_drr.c
sch_dsmark.c
sch_etf.c
sch_fifo.c
sch_fq_codel.c
sch_fq.c
sch_generic.c net: Fix data-races around weight_p and dev_weight_[rt]x_bias. 2022-09-05 10:27:41 +02:00
sch_gred.c
sch_hfsc.c
sch_hhf.c
sch_htb.c
sch_ingress.c
sch_mq.c
sch_mqprio.c
sch_multiq.c
sch_netem.c net/sched: sch_netem: Fix arithmetic in netem_dump() for 32-bit platforms 2022-06-29 08:58:46 +02:00
sch_pie.c
sch_plug.c
sch_prio.c
sch_qfq.c
sch_red.c net: sched: Fix use after free in red_enqueue() 2022-11-10 17:57:50 +01:00
sch_sfb.c sch_sfb: Also store skb len before calling child enqueue 2022-09-15 12:04:56 +02:00
sch_sfq.c
sch_skbprio.c
sch_taprio.c net/sched: taprio: make qdisc_leaf() see the per-netdev-queue pfifo child qdiscs 2022-09-28 11:04:07 +02:00
sch_tbf.c net: sched: tbf: don't call qdisc_put() while holding tree lock 2022-09-15 12:04:50 +02:00
sch_teql.c