[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202106180903.E89363BB@keescook>
Date: Fri, 18 Jun 2021 09:07:54 -0700
From: Kees Cook <keescook@...omium.org>
To: Subbaraya Sundeep <sbhatta@...vell.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org,
sgoutham@...vell.com, hkelam@...vell.com, gakula@...vell.com
Subject: Re: [net-next PATCH 1/5] octeontx2-af: cn10k: Bandwidth profiles
config support
On Tue, Jun 15, 2021 at 05:04:27PM +0530, Subbaraya Sundeep wrote:
> [...]
> @@ -885,6 +906,9 @@ static int rvu_nix_blk_aq_enq_inst(struct rvu *rvu, struct nix_hw *nix_hw,
> else if (req->ctype == NIX_AQ_CTYPE_MCE)
> memcpy(&rsp->mce, ctx,
> sizeof(struct nix_rx_mce_s));
> + else if (req->ctype == NIX_AQ_CTYPE_BANDPROF)
> + memcpy(&rsp->prof, ctx,
> + sizeof(struct nix_bandprof_s));
rsp->prof is u64 not struct nix_bandprof_s, so the compiler thinks this
memcpy() is overflowing the "prof" field.
Can you please fix this up?
--
Kees Cook
Powered by blists - more mailing lists