lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aXOWK2IkFikFQxnb@rkannoth-OptiPlex-7090>
Date: Fri, 23 Jan 2026 21:09:23 +0530
From: Ratheesh Kannoth <rkannoth@...vell.com>
To: Simon Horman <horms@...nel.org>
CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <sgoutham@...vell.com>, <davem@...emloft.net>, <edumazet@...gle.com>,
        <kuba@...nel.org>, <pabeni@...hat.com>, <andrew+netdev@...n.ch>
Subject: Re: [PATCH net-next v4 07/13] octeontx2-af: npc: cn20k: Prepare for
 new SoC

On 2026-01-22 at 14:06:10, Simon Horman (horms@...nel.org) wrote:
> On Tue, Jan 13, 2026 at 03:46:52PM +0530, Ratheesh Kannoth wrote:
> > @@ -945,12 +945,12 @@ void npc_update_entry(struct rvu *rvu, enum key_fields type,
> >  			kw2 = shift ? val_lo >> (64 - shift) : 0;
> >  			kw2 |= (val_hi << shift);
> >  			kw2 &= field->kw_mask[i + 1];
> > -			dummy.kw[i + 1] = kw2;
> > +			kw[i + 1] = kw2;
>
> Hi Ratheesh,
>
> It's not a problem introduced by this patch.
> But it seems that this could overrun kw if i is max_kw - 1.
> Likewise elsewhere in this loop.
>
> Flagged by Smatch.
ACK.

>
> >  			/* update entry mask */
> >  			kw2 = shift ? mask_lo >> (64 - shift) : 0;
> >  			kw2 |= (mask_hi << shift);
> >  			kw2 &= field->kw_mask[i + 1];
> > -			dummy.kw_mask[i + 1] = kw2;
> > +			kw_mask[i + 1] = kw2;
> >  			break;
> >  		}
> >  		/* place remaining bits of key value in kw[x + 1], kw[x + 2] */
> > @@ -961,34 +961,40 @@ void npc_update_entry(struct rvu *rvu, enum key_fields type,
> >  			kw2 &= field->kw_mask[i + 1];
> >  			kw3 = shift ? val_hi >> (64 - shift) : 0;
> >  			kw3 &= field->kw_mask[i + 2];
> > -			dummy.kw[i + 1] = kw2;
> > -			dummy.kw[i + 2] = kw3;
> > +			kw[i + 1] = kw2;
> > +			kw[i + 2] = kw3;
> >  			/* update entry mask */
> >  			kw2 = shift ? mask_lo >> (64 - shift) : 0;
> >  			kw2 |= (mask_hi << shift);
> >  			kw2 &= field->kw_mask[i + 1];
> >  			kw3 = shift ? mask_hi >> (64 - shift) : 0;
> >  			kw3 &= field->kw_mask[i + 2];
> > -			dummy.kw_mask[i + 1] = kw2;
> > -			dummy.kw_mask[i + 2] = kw3;
> > +			kw_mask[i + 1] = kw2;
> > +			kw_mask[i + 2] = kw3;
> >  			break;
> >  		}
> >  	}
>
> ...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ