From: Greg Kroah-Hartman Date: Mon, 20 Feb 2023 11:51:08 +0000 (+0100) Subject: 6.1-stable patches X-Git-Tag: v4.14.306~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1a63d1cd29fd393e155988cfe5268682fe8b7e00;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches added patches: net-sched-sch-fix-off-by-one-in-htb_activate_prios.patch --- diff --git a/queue-6.1/net-sched-sch-fix-off-by-one-in-htb_activate_prios.patch b/queue-6.1/net-sched-sch-fix-off-by-one-in-htb_activate_prios.patch new file mode 100644 index 00000000000..d4f6e30da19 --- /dev/null +++ b/queue-6.1/net-sched-sch-fix-off-by-one-in-htb_activate_prios.patch @@ -0,0 +1,33 @@ +From 9cec2aaffe969f2a3e18b5ec105fc20bb908e475 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Mon, 6 Feb 2023 16:18:32 +0300 +Subject: net: sched: sch: Fix off by one in htb_activate_prios() + +From: Dan Carpenter + +commit 9cec2aaffe969f2a3e18b5ec105fc20bb908e475 upstream. + +The > needs be >= to prevent an out of bounds access. + +Fixes: de5ca4c3852f ("net: sched: sch: Bounds check priority") +Signed-off-by: Dan Carpenter +Reviewed-by: Simon Horman +Reviewed-by: Kees Cook +Link: https://lore.kernel.org/r/Y+D+KN18FQI2DKLq@kili +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + net/sched/sch_htb.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/net/sched/sch_htb.c ++++ b/net/sched/sch_htb.c +@@ -429,7 +429,7 @@ static void htb_activate_prios(struct ht + while (m) { + unsigned int prio = ffz(~m); + +- if (WARN_ON_ONCE(prio > ARRAY_SIZE(p->inner.clprio))) ++ if (WARN_ON_ONCE(prio >= ARRAY_SIZE(p->inner.clprio))) + break; + m &= ~(1 << prio); + diff --git a/queue-6.1/series b/queue-6.1/series index 6d56cb35c49..e1acdfed439 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -115,3 +115,4 @@ perf-x86-refuse-to-export-capabilities-for-hybrid-pmus.patch alarmtimer-prevent-starvation-by-small-intervals-and-sig_ign.patch nvme-pci-refresh-visible-attrs-for-cmb-attributes.patch asoc-sof-intel-hda-dai-fix-possible-stream_tag-leak.patch +net-sched-sch-fix-off-by-one-in-htb_activate_prios.patch