[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAM0EoMnhsZRRXs1woTRYCeWBEYrR_Ffs8yUfVjg8uoXvLmkvWg@mail.gmail.com>
Date: Sat, 11 Jan 2025 08:58:02 -0500
From: Jamal Hadi Salim <jhs@...atatu.com>
To: netdev@...r.kernel.org
Cc: jiri@...nulli.us, xiyou.wangcong@...il.com, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, petrm@...lanox.com, security@...nel.org,
g1042620637@...il.com
Subject: Re: [PATCH net v2 1/1] net: sched: fix ets qdisc OOB Indexing
On Sat, Jan 11, 2025 at 8:26 AM Jamal Hadi Salim <jhs@...atatu.com> wrote:
>
> Haowei Yan <g1042620637@...il.com> found that ets_class_from_arg() can
> index an Out-Of-Bound class in ets_class_from_arg() when passed clid of
> 0. The overflow may cause local privilege escalation.
>
> diff --git a/net/sched/sch_ets.c b/net/sched/sch_ets.c
> index f80bc05d4c5a..c640f915411f 100644
> --- a/net/sched/sch_ets.c
> +++ b/net/sched/sch_ets.c
> @@ -91,6 +91,8 @@ ets_class_from_arg(struct Qdisc *sch, unsigned long arg)
> {
> struct ets_sched *q = qdisc_priv(sch);
>
> + if (arg == 0 || arg >= TCQ_ETS_MAX_BANDS)
> + return NULL;
> return &q->classes[arg - 1];
> }
>
Please ignore this - need to test more conditions. I will send v3
cheers,
jamal
Powered by blists - more mailing lists