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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250528184449.GI1484967@horms.kernel.org>
Date: Wed, 28 May 2025 19:44:49 +0100
From: Simon Horman <horms@...nel.org>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Eugenia Emantayev <eugenia@...lanox.com>,
	Tariq Toukan <tariqt@...dia.com>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Or Gerlitz <ogerlitz@...lanox.com>,
	Matan Barak <matanb@...lanox.com>, netdev@...r.kernel.org,
	linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [PATCH v2 net] net/mlx4_en: Prevent potential integer overflow
 calculating Hz

On Wed, May 28, 2025 at 11:11:09AM +0300, Dan Carpenter wrote:
> The "freq" variable is in terms of MHz and "max_val_cycles" is in terms
> of Hz.  The fact that "max_val_cycles" is a u64 suggests that support
> for high frequency is intended but the "freq_khz * 1000" would overflow
> the u32 type if we went above 4GHz.  Use unsigned long long type for the
> mutliplication to prevent that.
> 
> Fixes: 31c128b66e5b ("net/mlx4_en: Choose time-stamping shift value according to HW frequency")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>

Reviewed-by: Simon Horman <horms@...nel.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ