summaryrefslogtreecommitdiff
path: root/net/sched
diff options
context:
space:
mode:
authorDenys Drozdov <denys.drozdov@toradex.com>2021-11-08 13:55:30 +0200
committerDenys Drozdov <denys.drozdov@toradex.com>2021-11-08 13:55:30 +0200
commit51cffbf29ed5a516ce75d7ae8ea7b2e9a318b392 (patch)
treefabc8b936899ec054c6469e0204c63a41e90d8ee /net/sched
parent50d0d350e8533a792d543e62d8443f4d34757ab1 (diff)
parentce061ef43f1dede7ee2bd907d2bf38402831e30d (diff)
Merge tag 'v5.4.154' into 5.4-2.3.x-imx
This is the 5.4.154 stable release
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/sch_api.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 3b1b5ee52137..e70f99033408 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -510,6 +510,12 @@ static struct qdisc_size_table *qdisc_get_stab(struct nlattr *opt,
return stab;
}
+ if (s->size_log > STAB_SIZE_LOG_MAX ||
+ s->cell_log > STAB_SIZE_LOG_MAX) {
+ NL_SET_ERR_MSG(extack, "Invalid logarithmic size of size table");
+ return ERR_PTR(-EINVAL);
+ }
+
stab = kmalloc(sizeof(*stab) + tsize * sizeof(u16), GFP_KERNEL);
if (!stab)
return ERR_PTR(-ENOMEM);