android_kernel_motorola_sm6375/net/sched
Repository files (latest commit first)
Filename Latest commit message Latest commit date
valis 1c8262f31f net/sched: cls_route: No longer copy tcf_result on update to avoid use-after-free
[ Upstream commit b80b829e9e2c1b3f7aae34855e04d8f6ecaf13c8 ]

When route4_change() is called on an existing filter, the whole
tcf_result struct is always copied into the new instance of the filter.

This causes a problem when updating a filter bound to a class,
as tcf_unbind_filter() is always called on the old instance in the
success path, decreasing filter_cnt of the still referenced class
and allowing it to be deleted, leading to a use-after-free.

Fix this by no longer copying the tcf_result struct from the old filter.

Fixes: 1109c00547 ("net: sched: RCU cls_route")
Reported-by: valis <[email protected]>
Reported-by: Bing-Jhong Billy Jheng <[email protected]>
Signed-off-by: valis <[email protected]>
Signed-off-by: Jamal Hadi Salim <[email protected]>
Reviewed-by: Victor Nogueira <[email protected]>
Reviewed-by: Pedro Tammela <[email protected]>
Reviewed-by: M A Ramdhan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2023-08-11 11:53:56 +02: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 net/sched: act_mirred: Add carrier check 2023-05-17 11:35:59 +02:00
act_mpls.c net/sched: act_mpls: Fix warning during failed attribute validation 2023-01-18 11:42:04 +01:00
act_nat.c
act_pedit.c net/sched: act_pedit: Add size check for TCA_PEDIT_PARMS_EX 2023-07-27 08:37:24 +02:00
act_police.c net/sched: act_police: more accurate MTU policing 2022-06-22 14:11:24 +02:00
act_sample.c net/sched: act_sample: fix action bind logic 2023-03-11 16:44:12 +01:00
act_simple.c
act_skbedit.c
act_skbmod.c
act_tunnel_key.c
act_vlan.c
cls_api.c net/sched: cls_api: Fix lockup on flushing explicitly created chain 2023-06-21 15:44:12 +02:00
cls_basic.c
cls_bpf.c
cls_cgroup.c
cls_flow.c treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
cls_flower.c net/sched: flower: Ensure both minimum and maximum ports are specified 2023-07-27 08:37:33 +02:00
cls_fw.c net/sched: cls_fw: No longer copy tcf_result on update to avoid use-after-free 2023-08-11 11:53:56 +02:00
cls_matchall.c
cls_route.c net/sched: cls_route: No longer copy tcf_result on update to avoid use-after-free 2023-08-11 11:53:56 +02:00
cls_rsvp.c
cls_rsvp.h
cls_rsvp6.c
cls_u32.c net/sched: cls_u32: No longer copy tcf_result on update to avoid use-after-free 2023-08-11 11:53:56 +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 net/sched: Retire tcindex classifier 2023-03-11 16:44:07 +01:00
Makefile net/sched: Retire tcindex classifier 2023-03-11 16:44:07 +01:00
sch_api.c net: sched: fix NULL pointer dereference in mq_attach 2023-06-09 10:28:54 +02:00
sch_atm.c net: sched: atm: dont intepret cls results when asked to drop 2023-01-18 11:41:58 +01:00
sch_blackhole.c
sch_cake.c treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
sch_cbq.c treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
sch_cbs.c
sch_choke.c
sch_codel.c
sch_drr.c
sch_dsmark.c
sch_etf.c
sch_fifo.c
sch_fq.c
sch_fq_codel.c treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
sch_generic.c net_sched: prevent NULL dereference if default qdisc setup failed 2023-04-20 12:07:34 +02:00
sch_gred.c
sch_hfsc.c treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
sch_hhf.c
sch_htb.c treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
sch_ingress.c net/sched: Reserve TC_H_INGRESS (TC_H_CLSACT) for ingress (clsact) Qdiscs 2023-06-09 10:28:54 +02:00
sch_mq.c
sch_mqprio.c net/sched: mqprio: Add length check for TCA_MQPRIO_{MAX/MIN}_RATE64 2023-08-11 11:53:48 +02:00
sch_multiq.c
sch_netem.c sch_netem: acquire qdisc lock in netem_change() 2023-06-28 10:18:40 +02:00
sch_pie.c
sch_plug.c
sch_prio.c
sch_qfq.c net/sched: sch_qfq: account for stab overhead in qfq_enqueue 2023-08-11 11:53:54 +02:00
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 treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
sch_skbprio.c
sch_taprio.c Revert "net/sched: taprio: make qdisc_leaf() see the per-netdev-queue pfifo child qdiscs" 2023-02-25 11:53:27 +01: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