android_kernel_motorola_sm6375/net/sched
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Pedro Tammela dbe778b08b net/sched: stop qdisc_tree_reduce_backlog on TC_H_ROOT
[ Upstream commit 2e95c4384438adeaa772caa560244b1a2efef816 ]

In qdisc_tree_reduce_backlog, Qdiscs with major handle ffff: are assumed
to be either root or ingress. This assumption is bogus since it's valid
to create egress qdiscs with major handle ffff:
Budimir Markovic found that for qdiscs like DRR that maintain an active
class list, it will cause a UAF with a dangling class pointer.

In 066a3b5b23, the concern was to avoid iterating over the ingress
qdisc since its parent is itself. The proper fix is to stop when parent
TC_H_ROOT is reached because the only way to retrieve ingress is when a
hierarchy which does not contain a ffff: major handle call into
qdisc_lookup with TC_H_MAJ(TC_H_ROOT).

In the scenario where major ffff: is an egress qdisc in any of the tree
levels, the updates will also propagate to TC_H_ROOT, which then the
iteration must stop.

Fixes: 066a3b5b23 ("[NET_SCHED] sch_api: fix qdisc_tree_decrease_qlen() loop")
Reported-by: Budimir Markovic <markovicbudimir@gmail.com>
Suggested-by: Jamal Hadi Salim <jhs@mojatatu.com>
Tested-by: Victor Nogueira <victor@mojatatu.com>
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>

 net/sched/sch_api.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Horman <horms@kernel.org>

Link: https://patch.msgid.link/20241024165547.418570-1-jhs@mojatatu.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-08 16:20:52 +01:00
..
act_api.c net/sched: act_api: fix possible infinite loop in tcf_idr_check_alloc() 2024-07-05 09:08:23 +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 net/sched: act_skbmod: prevent kernel-infoleak 2024-04-13 12:51:34 +02:00
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_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 net: annotate lockless accesses to sk->sk_max_ack_backlog 2024-11-08 16:20:46 +01:00
em_nbyte.c
em_text.c net: sched: em_text: fix possible memory leak in em_text_destroy() 2024-01-15 18:25:25 +01:00
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 dsmark qdisc 2024-03-01 13:13:32 +01:00
Makefile net/sched: Retire dsmark qdisc 2024-03-01 13:13:32 +01:00
sch_api.c net/sched: stop qdisc_tree_reduce_backlog on TC_H_ROOT 2024-11-08 16:20:52 +01:00
sch_blackhole.c
sch_cake.c sched: sch_cake: fix bulk flow accounting logic for host fairness 2024-09-12 11:03:51 +02:00
sch_cbs.c
sch_choke.c
sch_codel.c
sch_drr.c
sch_etf.c
sch_fifo.c net_sched: fix NULL deref in fifo_set_limit() 2021-10-13 10:08:18 +02:00
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 net/sched: sch_hfsc: upgrade 'rt' to 'sc' when it becomes a inner curve 2023-10-25 11:53:21 +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 net: sched: update default qdisc visibility after Tx queue cnt changes 2021-11-17 09:48:28 +01:00
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 net: sched: sch_multiq: fix possible OOB write in multiq_tune() 2024-07-05 09:08:11 +02:00
sch_netem.c sch/netem: fix use after free in netem_dequeue 2024-09-12 11:03:50 +02:00
sch_pie.c
sch_plug.c net: sched: sch_qfq: Fix UAF in qfq_dequeue() 2023-09-23 10:59:59 +02:00
sch_prio.c
sch_qfq.c net: sched: sch_qfq: Fix UAF in qfq_dequeue() 2023-09-23 10:59:59 +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 net: sched: fix use-after-free in taprio_change() 2024-11-08 16:20:51 +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