linux-stable/net/sched
Xiyu Yang 76e26651c8 net: sched: Fix qdisc_rate_table refcount leak when get tcf_block failed
[ Upstream commit c660701258 ]

The reference counting issue happens in one exception handling path of
cbq_change_class(). When failing to get tcf_block, the function forgets
to decrease the refcount of "rtab" increased by qdisc_put_rtab(),
causing a refcount leak.

Fix this issue by jumping to "failure" label when get tcf_block failed.

Fixes: 6529eaba33 ("net: sched: introduce tcf block infractructure")
Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn>
Reviewed-by: Cong Wang <cong.wang@bytedance.com>
Link: https://lore.kernel.org/r/1630252681-71588-1-git-send-email-xiyuyang19@fudan.edu.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-22 11:45:22 +02:00
..
act_api.c net: avoid potential infinite loop in tc_ctl_action() 2019-10-29 09:17:03 +01:00
act_bpf.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_connmark.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_csum.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_gact.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_ife.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_ipt.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_meta_mark.c
act_meta_skbprio.c
act_meta_skbtcindex.c
act_mirred.c act_mirred: Fix mirred_init_module error handling 2020-01-27 14:46:49 +01:00
act_nat.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_pedit.c net/sched: act_pedit: fix WARN() in the traffic path 2019-12-01 09:13:11 +01:00
act_police.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_sample.c net/sched: act_sample: don't push mac header on ip6gre ingress 2019-10-05 12:47:40 +02:00
act_simple.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_skbedit.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_skbmod.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_tunnel_key.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_vlan.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
cls_api.c net_sched: refetch skb protocol for each filter 2019-01-31 08:13:41 +01:00
cls_basic.c
cls_bpf.c
cls_cgroup.c
cls_flow.c
cls_flower.c net: sched: correct flower port blocking 2020-03-11 18:02:48 +01:00
cls_fw.c
cls_matchall.c net/sched: matchall: add missing validation of TCA_MATCHALL_FLAGS 2020-02-28 16:36:09 +01:00
cls_route.c net_sched: cls_route: remove the right filter from hashtable 2020-04-02 16:34:24 +02:00
cls_rsvp.c
cls_rsvp.h cls_rsvp: fix rsvp_policy 2020-02-14 16:32:06 -05:00
cls_rsvp6.c
cls_tcindex.c net: sched: fix warning in tcindex_alloc_perfect_hash 2021-07-20 16:17:38 +02:00
cls_u32.c net: sched: Fix memory exposure from short TCA_U32_SEL 2018-09-15 09:45:24 +02:00
em_canid.c
em_cmp.c
em_ipset.c
em_meta.c
em_nbyte.c
em_text.c
em_u32.c
ematch.c net_sched: ematch: reject invalid TCF_EM_SIMPLE 2020-02-05 14:18:09 +00:00
Kconfig
Makefile
sch_api.c net: sched: avoid duplicates in classes dump 2021-03-17 16:34:29 +01:00
sch_atm.c net_sched: fix a memory leak in atm_tc_init() 2020-07-22 09:22:20 +02:00
sch_blackhole.c net_sched: blackhole: tell upper qdisc about dropped packets 2018-07-22 14:28:46 +02:00
sch_cbq.c net: sched: Fix qdisc_rate_table refcount leak when get tcf_block failed 2021-09-22 11:45:22 +02:00
sch_choke.c net: sched: validate stab values 2021-03-30 14:40:12 +02:00
sch_codel.c net: sched: Fix a possible null-pointer dereference in dequeue_func() 2019-08-09 17:53:35 +02:00
sch_drr.c
sch_dsmark.c sch_dsmark: fix a NULL deref in qdisc_reset() 2021-06-03 08:36:25 +02:00
sch_fifo.c
sch_fq.c net: fq: add missing attribute validation for orphan mask 2020-03-20 10:54:11 +01:00
sch_fq_codel.c fq_codel: fix TCA_FQ_CODEL_DROP_BATCH_SIZE sanity checks 2020-05-20 08:16:53 +02:00
sch_generic.c net: sched: export __netdev_watchdog_up() 2020-06-30 15:37:57 -04:00
sch_gred.c net: sched: validate stab values 2021-03-30 14:40:12 +02:00
sch_hfsc.c
sch_hhf.c net/flow_dissector: switch to siphash 2019-11-10 11:25:37 +01:00
sch_htb.c
sch_ingress.c
sch_mq.c net: sched: fix tc -s class show no bstats on class with nolock subqueues 2019-12-05 15:38:19 +01:00
sch_mqprio.c net: sched: fix tc -s class show no bstats on class with nolock subqueues 2019-12-05 15:38:19 +01:00
sch_multiq.c net: sched: fix tc -s class show no bstats on class with nolock subqueues 2019-12-05 15:38:19 +01:00
sch_netem.c net: netem: correct the parent's backlog when corrupted packet was dropped 2020-01-27 14:46:50 +01:00
sch_pie.c
sch_plug.c
sch_prio.c net: sch_prio: When ungrafting, replace with FIFO 2020-01-12 12:12:08 +01:00
sch_qfq.c pkt_sched: sch_qfq: fix qfq_change_class() error path 2021-07-20 16:17:37 +02:00
sch_red.c net: sched: validate stab values 2021-03-30 14:40:12 +02:00
sch_sfb.c net/flow_dissector: switch to siphash 2019-11-10 11:25:37 +01:00
sch_sfq.c net: sched: validate stab values 2021-03-30 14:40:12 +02:00
sch_tbf.c net: create skb_gso_validate_mac_len() 2019-02-20 10:20:48 +01:00
sch_teql.c net: sched: sch_teql: fix null-pointer dereference 2021-04-16 11:57:48 +02:00