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: <20260129155010.64297c67@kernel.org>
Date: Thu, 29 Jan 2026 15:50:10 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Ratheesh Kannoth <rkannoth@...vell.com>
Cc: <edumazet@...gle.com>, <sumang@...vell.com>,
 <linux-kernel@...r.kernel.org>, <sbhatta@...vell.com>,
 <davem@...emloft.net>, <netdev@...r.kernel.org>, <pabeni@...hat.com>,
 <andrew+netdev@...n.ch>, <sgoutham@...vell.com>
Subject: Re: [net-next,v6,01/13] octeontx2-af: npc: cn20k: Index management

On Thu, 29 Jan 2026 10:53:00 +0530 Ratheesh Kannoth wrote:
> > When cnt is odd, the final loop iteration has i = cnt - 1, which means
> > subbank_srch_order[i + 1] writes to index cnt, which is out of bounds.
> >
> > For example with cnt = 5, the loop iterates with i = 0, 2, 4. At i = 4,
> > the array access subbank_srch_order[5] overflows the allocated array of
> > 5 elements.
> >
> > While CN20K hardware typically has 32 subbanks (even), the value is read
> > from a hardware register at npc_priv_init() without validation beyond
> > checking for zero. Could this lead to memory corruption if the hardware
> > reports an odd subbank count?  
> subbank count is 16 or 8, depending on SoC variant. i will add a WARN check on
> odd ?

Or just a comment may work to prevent the false positive

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ