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: <20251201141858.399fff62@kernel.org>
Date: Mon, 1 Dec 2025 14:18:58 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Parvathi Pudi <parvathi@...thit.com>
Cc: andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
 pabeni@...hat.com, danishanwar@...com, rogerq@...nel.org,
 pmohan@...thit.com, basharath@...thit.com, afd@...com,
 linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, alok.a.tiwari@...cle.com,
 horms@...nel.org, pratheesh@...com, j-rameshbabu@...com, vigneshr@...com,
 praneeth@...com, srk@...com, rogerq@...com, krishna@...thit.com,
 mohan@...thit.com
Subject: Re: [PATCH net-next v8 1/3] net: ti: icssm-prueth: Add helper
 functions to configure and maintain FDB

On Wed, 26 Nov 2025 21:57:12 +0530 Parvathi Pudi wrote:
> +	u8 hash_val, mac_tbl_idx;

Using narrow types is generally quite counter productive.
It can easily mask out-of-range accesses and subtle errors,
given that max is outside of the range of the u8 type:

+#define FDB_INDEX_TBL_MAX_ENTRIES     256
+#define FDB_MAC_TBL_MAX_ENTRIES       256

You should consider changing all the local variables to unsigned int.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ