Cong Wang
e05d9938b1
net_sched: Prevent creation of classes with TC_H_ROOT
...
[ Upstream commit 0c3057a5a04d07120b3d0ec9c79568fceb9c921e ]
The function qdisc_tree_reduce_backlog() uses TC_H_ROOT as a termination
condition when traversing up the qdisc tree to update parent backlog
counters. However, if a class is created with classid TC_H_ROOT, the
traversal terminates prematurely at this class instead of reaching the
actual root qdisc, causing parent statistics to be incorrectly maintained.
In case of DRR, this could lead to a crash as reported by Mingi Cho.
Prevent the creation of any Qdisc class with classid TC_H_ROOT
(0xFFFFFFFF) across all qdisc types, as suggested by Jamal.
Reported-by: Mingi Cho <mincho@theori.io>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Fixes: 066a3b5b23 ("[NET_SCHED] sch_api: fix qdisc_tree_decrease_qlen() loop")
Link: https://patch.msgid.link/20250306232355.93864-2-xiyou.wangcong@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-04-10 14:29:35 +02: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
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
net_sched: cls_flow: validate TCA_FLOW_RSHIFT attribute
2025-02-01 18:18:45 +01:00
cls_flower.c
net: extract port range fields from fl_flow_key
2025-03-13 12:43:23 +01: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: Prevent creation of classes with TC_H_ROOT
2025-04-10 14:29:35 +02:00
sch_blackhole.c
sch_cake.c
sched: sch_cake: add bounds checks to host bulk flow fairness counts
2025-03-13 12:43:04 +01:00
sch_cbs.c
net/sched: cbs: Fix integer overflow in cbs_set_port_rate()
2024-12-14 19:44:51 +01:00
sch_choke.c
net: sched: fix ordering of qlen adjustment
2025-01-09 13:23:26 +01:00
sch_codel.c
sch_drr.c
sch_etf.c
sch_fifo.c
pfifo_tail_enqueue: Drop new packet when sch->limit == 0
2025-03-13 12:43:25 +01: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
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
netem: Update sch->q.qlen before qdisc_tree_reduce_backlog()
2025-03-13 12:43:06 +01: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: correct backlog statistic for GSO packets
2024-12-14 19:44:45 +01:00
sch_teql.c