kernel_samsung_a53x/net/sched
Eric Dumazet 3cba57a6fb net/sched: taprio: always validate TCA_TAPRIO_ATTR_PRIOMAP
[ Upstream commit f921a58ae20852d188f70842431ce6519c4fdc36 ]

If one TCA_TAPRIO_ATTR_PRIOMAP attribute has been provided,
taprio_parse_mqprio_opt() must validate it, or userspace
can inject arbitrary data to the kernel, the second time
taprio_change() is called.

First call (with valid attributes) sets dev->num_tc
to a non zero value.

Second call (with arbitrary mqprio attributes)
returns early from taprio_parse_mqprio_opt()
and bad things can happen.

Fixes: a3d43c0d56f1 ("taprio: Add support adding an admin schedule")
Reported-by: Noam Rathaus <noamr@ssd-disclosure.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20240604181511.769870-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 14:19:01 +01:00
..
act_api.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act_bpf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act_connmark.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act_csum.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act_ct.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act_ctinfo.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act_gact.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act_gate.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act_ife.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act_ipt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act_meta_mark.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act_meta_skbprio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act_meta_skbtcindex.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act_mirred.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act_mpls.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act_nat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act_pedit.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act_police.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act_sample.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act_simple.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act_skbedit.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act_skbmod.c net/sched: act_skbmod: prevent kernel-infoleak 2024-11-19 09:22:46 +01:00
act_tunnel_key.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act_vlan.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cls_api.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cls_basic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cls_bpf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cls_cgroup.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cls_flow.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cls_flower.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cls_fw.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cls_matchall.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cls_route.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cls_u32.c net: sched: cls_u32: Fix allocation size in u32_init() 2024-11-18 10:58:46 +01:00
em_canid.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
em_cmp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
em_ipset.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
em_ipt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
em_meta.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
em_nbyte.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
em_text.c net: sched: em_text: fix possible memory leak in em_text_destroy() 2024-11-18 12:12:06 +01:00
em_u32.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ematch.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_api.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_atm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_blackhole.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_cake.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_cbq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_cbs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_choke.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_codel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_drr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_dsmark.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_etf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_ets.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_fifo.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_fq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_fq_codel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_fq_pie.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_generic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_gred.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_hfsc.c net/sched: sch_hfsc: upgrade 'rt' to 'sc' when it becomes a inner curve 2024-11-08 11:26:11 +01:00
sch_hhf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_htb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_ingress.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_mq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_mqprio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_multiq.c net: sched: sch_multiq: fix possible OOB write in multiq_tune() 2024-11-19 14:19:00 +01:00
sch_netem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_pie.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_plug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_prio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_qfq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_red.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_sfb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_sfq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_skbprio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_taprio.c net/sched: taprio: always validate TCA_TAPRIO_ATTR_PRIOMAP 2024-11-19 14:19:01 +01:00
sch_tbf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sch_teql.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00