linux/net/sched
Maher Azzouzi ffd2dc4c6c net/sched: mqprio: fix stack out-of-bounds write in tc entry parsing
TCA_MQPRIO_TC_ENTRY_INDEX is validated using
NLA_POLICY_MAX(NLA_U32, TC_QOPT_MAX_QUEUE), which allows the value
TC_QOPT_MAX_QUEUE (16). This leads to a 4-byte out-of-bounds stack
write in the fp[] array, which only has room for 16 elements (0–15).

Fix this by changing the policy to allow only up to TC_QOPT_MAX_QUEUE - 1.

Fixes: f62af20bed ("net/sched: mqprio: allow per-TC user input of FP adminStatus")
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Maher Azzouzi <maherazz04@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20250802001857.2702497-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-08-04 17:22:20 -07:00
..
act_api.c net/sched: acp_api: no longer acquire RTNL in tc_action_net_exit() 2025-07-08 13:00:24 +02:00
act_bpf.c
act_connmark.c net_sched: act_connmark: use RCU in tcf_connmark_dump() 2025-07-11 16:01:15 -07:00
act_csum.c net_sched: act_csum: use RCU in tcf_csum_dump() 2025-07-11 16:01:16 -07:00
act_ct.c net_sched: act_ct: use RCU in tcf_ct_dump() 2025-07-11 16:01:16 -07:00
act_ctinfo.c net_sched: act_ctinfo: use RCU in tcf_ctinfo_dump() 2025-07-11 16:01:16 -07:00
act_gact.c
act_gate.c net/sched: Switch to use hrtimer_setup() 2025-02-18 10:35:44 +01:00
act_ife.c
act_meta_mark.c
act_meta_skbprio.c
act_meta_skbtcindex.c
act_mirred.c net/sched: act_mirred: Move the recursion counter struct netdev_xmit 2025-05-15 15:23:31 +02:00
act_mpls.c net_sched: act_mpls: use RCU in tcf_mpls_dump() 2025-07-11 16:01:16 -07:00
act_nat.c net_sched: act_nat: use RCU in tcf_nat_dump() 2025-07-11 16:01:16 -07:00
act_pedit.c net_sched: act_pedit: use RCU in tcf_pedit_dump() 2025-07-11 16:01:17 -07:00
act_police.c net_sched: act_police: use RCU in tcf_police_dump() 2025-07-11 16:01:17 -07:00
act_sample.c
act_simple.c
act_skbedit.c net_sched: act_skbedit: use RCU in tcf_skbedit_dump() 2025-07-11 16:01:17 -07:00
act_skbmod.c
act_tunnel_key.c net: fix geneve_opt length integer overflow 2025-04-03 15:47:35 -07:00
act_vlan.c tc: adjust network header after 2nd vlan push 2024-08-27 11:37:42 +02:00
bpf_qdisc.c bpf: Clean up individual BTF_ID code 2025-07-16 18:34:42 -07:00
cls_api.c tc: Ensure we have enough buffer space when sending filter netlink notifications 2025-04-08 13:57:49 +02:00
cls_basic.c
cls_bpf.c net: sched: refine software bypass handling in tc_run 2025-01-20 09:21:27 +00:00
cls_cgroup.c
cls_flow.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
cls_flower.c net: fix geneve_opt length integer overflow 2025-04-03 15:47:35 -07:00
cls_fw.c
cls_matchall.c net: sched: refine software bypass handling in tc_run 2025-01-20 09:21:27 +00:00
cls_route.c
cls_u32.c net: sched: refine software bypass handling in tc_run 2025-01-20 09:21:27 +00:00
em_canid.c
em_cmp.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
em_ipset.c
em_ipt.c
em_meta.c net: dismiss sk_forward_alloc_get() 2025-02-19 19:05:28 -08:00
em_nbyte.c
em_text.c net/sched: replace strncpy with strscpy 2025-06-23 16:56:51 -07:00
em_u32.c
ematch.c
Kconfig sched: Add enqueue/dequeue of dualpi2 qdisc 2025-07-23 17:52:07 -07:00
Makefile sched: Add enqueue/dequeue of dualpi2 qdisc 2025-07-23 17:52:07 -07:00
sch_api.c net/sched: sch_qfq: Fix null-deref in agg_dequeue 2025-07-10 11:08:35 +02:00
sch_blackhole.c
sch_cake.c net: account for encap headers in qdisc pkt len 2025-07-08 08:55:33 -07:00
sch_cbs.c net/sched: cbs: Fix integer overflow in cbs_set_port_rate() 2024-10-15 18:25:47 -07:00
sch_choke.c net: sched: fix ordering of qlen adjustment 2024-12-04 12:54:22 +00:00
sch_codel.c net_sched: Flush gso_skb list too during ->change() 2025-05-09 12:34:38 +01:00
sch_drr.c net_sched: drr: Fix double list add in class with netem as child qdisc 2025-04-28 15:55:06 -07:00
sch_dualpi2.c sched: Add enqueue/dequeue of dualpi2 qdisc 2025-07-23 17:52:07 -07:00
sch_etf.c
sch_ets.c net_sched: ets: fix a race in ets_qdisc_change() 2025-06-12 08:05:50 -07:00
sch_fifo.c pfifo_tail_enqueue: Drop new packet when sch->limit == 0 2025-02-05 18:13:58 -08:00
sch_fq_codel.c net_sched: Flush gso_skb list too during ->change() 2025-05-09 12:34:38 +01:00
sch_fq_pie.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
sch_fq.c net_sched: Flush gso_skb list too during ->change() 2025-05-09 12:34:38 +01:00
sch_frag.c net/sched: Use nested-BH locking for sch_frag_data_storage 2025-05-15 15:23:31 +02:00
sch_generic.c net/sched: Add precise drop reason for pfifo_fast queue overflows 2025-07-25 15:47:21 -07:00
sch_gred.c sched: address a potential NULL pointer dereference in the GRED scheduler. 2025-03-06 16:35:14 -08:00
sch_hfsc.c net/sched: sch_qfq: Fix null-deref in agg_dequeue 2025-07-10 11:08:35 +02:00
sch_hhf.c net_sched: Flush gso_skb list too during ->change() 2025-05-09 12:34:38 +01:00
sch_htb.c net/sched: Return NULL when htb_lookup_leaf encounters an empty rbtree 2025-07-17 07:47:55 -07:00
sch_ingress.c
sch_mq.c
sch_mqprio_lib.c
sch_mqprio_lib.h
sch_mqprio.c net/sched: mqprio: fix stack out-of-bounds write in tc entry parsing 2025-08-04 17:22:20 -07:00
sch_multiq.c
sch_netem.c net/sched: Restrict conditions for adding duplicating netems to qdisc tree 2025-07-11 15:50:21 -07:00
sch_pie.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
sch_plug.c
sch_prio.c net_sched: prio: fix a race in prio_tune() 2025-06-12 08:05:49 -07:00
sch_qfq.c net/sched: sch_qfq: Avoid triggering might_sleep in atomic context in qfq_delete_class 2025-07-22 11:48:34 +02:00
sch_red.c Including fixes from bluetooth and wireless. 2025-06-12 09:50:36 -07:00
sch_sfb.c net/sched: Add drop reasons for AQM-based qdiscs 2024-12-17 13:27:29 +01:00
sch_sfq.c Including fixes from bluetooth and wireless. 2025-06-12 09:50:36 -07:00
sch_skbprio.c net_sched: skbprio: Remove overly strict queue assertions 2025-04-02 16:03:32 -07:00
sch_taprio.c net/sched: taprio: enforce minimum value for picos_per_byte 2025-08-01 15:15:28 -07:00
sch_tbf.c net_sched: tbf: fix a race in tbf_change() 2025-06-12 08:05:50 -07:00
sch_teql.c