android_kernel_motorola_sm6375/net/sched
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Pedro Tammela f34916502d net/sched: sch_hfsc: upgrade 'rt' to 'sc' when it becomes a inner curve
commit a13b67c9a015c4e21601ef9aa4ec9c5d972df1b4 upstream.

Christian Theune says:
   I upgraded from 6.1.38 to 6.1.55 this morning and it broke my traffic shaping script,
   leaving me with a non-functional uplink on a remote router.

A 'rt' curve cannot be used as a inner curve (parent class), but we were
allowing such configurations since the qdisc was introduced. Such
configurations would trigger a UAF as Budimir explains:
   The parent will have vttree_insert() called on it in init_vf(),
   but will not have vttree_remove() called on it in update_vf()
   because it does not have the HFSC_FSC flag set.

The qdisc always assumes that inner classes have the HFSC_FSC flag set.
This is by design as it doesn't make sense 'qdisc wise' for an 'rt'
curve to be an inner curve.

Budimir's original patch disallows users to add classes with a 'rt'
parent, but this is too strict as it breaks users that have been using
'rt' as a inner class. Another approach, taken by this patch, is to
upgrade the inner 'rt' into a 'sc', warning the user in the process.
It avoids the UAF reported by Budimir while also being more permissive
to bad scripts/users/code using 'rt' as a inner class.

Users checking the `tc class ls [...]` or `tc class get [...]` dumps would
observe the curve change and are potentially breaking with this change.

v1->v2: https://lore.kernel.org/all/20231013151057.2611860-1-pctammela@mojatatu.com/
- Correct 'Fixes' tag and merge with revert (Jakub)

Cc: Christian Theune <ct@flyingcircus.io>
Cc: Budimir Markovic <markovicbudimir@gmail.com>
Fixes: b3d26c5702c7 ("net/sched: sch_hfsc: Ensure inner classes have fsc curve")
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Link: https://lore.kernel.org/r/20231017143602.3191556-1-pctammela@mojatatu.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-25 11:53:21 +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
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_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 rsvp classifier 2023-09-23 11:00:07 +02:00
Makefile net/sched: Retire rsvp classifier 2023-09-23 11:00:07 +02:00
sch_api.c net/sched: fix a qdisc modification with ambiguous command request 2023-08-30 16:27:24 +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 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
sch_netem.c sch_netem: fix issues in netem_change() vs get_dist_table() 2023-08-16 18:19:25 +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 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