[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240604213149.wjiff3viqokkonmn@skbuf>
Date: Wed, 5 Jun 2024 00:31:49 +0300
From: Vladimir Oltean <vladimir.oltean@....com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Jamal Hadi Salim <jhs@...atatu.com>,
Cong Wang <xiyou.wangcong@...il.com>, Jiri Pirko <jiri@...nulli.us>,
netdev@...r.kernel.org, eric.dumazet@...il.com,
Noam Rathaus <noamr@...-disclosure.com>,
Vinicius Costa Gomes <vinicius.gomes@...el.com>
Subject: Re: [PATCH net] net/sched: taprio: always validate
TCA_TAPRIO_ATTR_PRIOMAP
On Tue, Jun 04, 2024 at 06:15:11PM +0000, Eric Dumazet wrote:
> 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@...-disclosure.com>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: Vinicius Costa Gomes <vinicius.gomes@...el.com>
> Cc: Vladimir Oltean <vladimir.oltean@....com>
> ---
Reviewed-by: Vladimir Oltean <vladimir.oltean@....com>
Powered by blists - more mailing lists