linux-yocto/net/sched
Eric Dumazet 0357da9149 net_sched: sch_sfq: reject invalid perturb period
commit 7ca52541c0 upstream.

Gerrard Tai reported that SFQ perturb_period has no range check yet,
and this can be used to trigger a race condition fixed in a separate patch.

We want to make sure ctl->perturb_period * HZ will not overflow
and is positive.

Tested:

tc qd add dev lo root sfq perturb -10   # negative value : error
Error: sch_sfq: invalid perturb period.

tc qd add dev lo root sfq perturb 1000000000 # too big : error
Error: sch_sfq: invalid perturb period.

tc qd add dev lo root sfq perturb 2000000 # acceptable value
tc -s -d qd sh dev lo
qdisc sfq 8005: root refcnt 2 limit 127p quantum 64Kb depth 127 flows 128 divisor 1024 perturb 2000000sec
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Reported-by: Gerrard Tai <gerrard.tai@starlabs.sg>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20250611083501.1810459-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-06-27 11:08:59 +01:00
..
act_api.c net: use unrcu_pointer() helper 2024-12-09 10:32:10 +01:00
act_bpf.c net: Rename mono_delivery_time to tstamp_type for scalabilty 2025-05-09 09:43:57 +02:00
act_connmark.c
act_csum.c
act_ct.c
act_ctinfo.c
act_gact.c
act_gate.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
act_police.c
act_sample.c
act_simple.c
act_skbedit.c
act_skbmod.c
act_tunnel_key.c net: fix geneve_opt length integer overflow 2025-04-10 14:37:40 +02:00
act_vlan.c
cls_api.c tc: Ensure we have enough buffer space when sending filter netlink notifications 2025-04-25 10:45:06 +02:00
cls_basic.c
cls_bpf.c net: Rename mono_delivery_time to tstamp_type for scalabilty 2025-05-09 09:43:57 +02:00
cls_cgroup.c
cls_flow.c net_sched: cls_flow: validate TCA_FLOW_RSHIFT attribute 2025-01-17 13:36:12 +01:00
cls_flower.c net: fix geneve_opt length integer overflow 2025-04-10 14:37:40 +02:00
cls_fw.c
cls_matchall.c
cls_route.c
cls_u32.c net: sched: cls_u32: Fix u32's systematic failure to free IDR entries for hnodes. 2024-11-22 15:38:32 +01: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
Kconfig
Makefile
sch_api.c net_sched: Prevent creation of classes with TC_H_ROOT 2025-03-22 12:50:39 -07:00
sch_blackhole.c
sch_cake.c sched: sch_cake: add bounds checks to host bulk flow fairness counts 2025-01-17 13:36:15 +01:00
sch_cbs.c net/sched: cbs: Fix integer overflow in cbs_set_port_rate() 2024-12-14 20:00:03 +01:00
sch_choke.c net: sched: fix ordering of qlen adjustment 2024-12-27 13:58:41 +01:00
sch_codel.c net_sched: Flush gso_skb list too during ->change() 2025-05-22 14:12:15 +02:00
sch_drr.c sch_drr: make drr_qlen_notify() idempotent 2025-05-09 09:44:04 +02:00
sch_etf.c
sch_ets.c net_sched: ets: fix a race in ets_qdisc_change() 2025-06-19 15:28:43 +02:00
sch_fifo.c pfifo_tail_enqueue: Drop new packet when sch->limit == 0 2025-03-13 12:58:40 +01:00
sch_fq_codel.c net_sched: Flush gso_skb list too during ->change() 2025-05-22 14:12:15 +02:00
sch_fq_pie.c net_sched: Flush gso_skb list too during ->change() 2025-05-22 14:12:15 +02:00
sch_fq.c net_sched: Flush gso_skb list too during ->change() 2025-05-22 14:12:15 +02:00
sch_frag.c
sch_generic.c net: fix races in netdev_tx_sent_queue()/dev_watchdog() 2024-11-01 01:58:29 +01:00
sch_gred.c sched: address a potential NULL pointer dereference in the GRED scheduler. 2025-03-22 12:50:38 -07:00
sch_hfsc.c net_sched: hfsc: Address reentrant enqueue adding class to eltree twice 2025-06-04 14:42:24 +02:00
sch_hhf.c net_sched: Flush gso_skb list too during ->change() 2025-05-22 14:12:15 +02:00
sch_htb.c sch_htb: make htb_deactivate() idempotent 2025-05-18 08:24:04 +02:00
sch_ingress.c
sch_mq.c
sch_mqprio_lib.c
sch_mqprio_lib.h
sch_mqprio.c
sch_multiq.c
sch_netem.c netem: Update sch->q.qlen before qdisc_tree_reduce_backlog() 2025-02-17 09:40:14 +01:00
sch_pie.c net_sched: Flush gso_skb list too during ->change() 2025-05-22 14:12:15 +02:00
sch_plug.c
sch_prio.c net_sched: prio: fix a race in prio_tune() 2025-06-19 15:28:43 +02:00
sch_qfq.c sch_qfq: make qfq_qlen_notify() idempotent 2025-05-09 09:44:04 +02:00
sch_red.c net_sched: red: fix a race in __red_change() 2025-06-19 15:28:43 +02:00
sch_sfb.c
sch_sfq.c net_sched: sch_sfq: reject invalid perturb period 2025-06-27 11:08:59 +01:00
sch_skbprio.c net_sched: skbprio: Remove overly strict queue assertions 2025-04-10 14:37:39 +02:00
sch_taprio.c net/sched: fix use-after-free in taprio_dev_notifier 2025-06-27 11:08:48 +01:00
sch_tbf.c net_sched: tbf: fix a race in tbf_change() 2025-06-19 15:28:43 +02:00
sch_teql.c