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: <a600d7e1-2cb3-466c-8e0c-0e0a4e9fc5c8@nvidia.com>
Date: Fri, 17 Jan 2025 13:44:29 +0200
From: Moshe Shemesh <moshe@...dia.com>
To: Colin Ian King <colin.i.king@...il.com>, Saeed Mahameed
	<saeedm@...dia.com>, Leon Romanovsky <leon@...nel.org>, 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>, Yevgeny Kliteynik
	<kliteyn@...dia.com>, Mark Bloch <mbloch@...dia.com>,
	<netdev@...r.kernel.org>, <linux-rdma@...r.kernel.org>
CC: <kernel-janitors@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH][next] net/mlx5: fix unintentional sign extension on shift
 of dest_attr->vport.vhca_id



On 1/16/2025 8:17 PM, Colin Ian King wrote:
> Shifting dest_attr->vport.vhca_id << 16 results in a promotion from an
> unsigned 16 bit integer to a 32 bit signed integer, this is then sign
> extended to a 64 bit unsigned long on 64 bitarchitectures. If vhca_id is
> greater than 0x7fff then this leads to a sign extended result where all
> the upper 32 bits of idx are set to 1. Fix this by casting vhca_id
> to the same type as idx before performing the shift.
> 
> Fixes: 8e2e08a6d1e0 ("net/mlx5: fs, add support for dest vport HWS action")
> Signed-off-by: Colin Ian King<colin.i.king@...il.com>

Acked-by: Moshe Shemesh <moshe@...dia.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ