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]
Date: Mon, 4 Mar 2024 15:22:47 +0200 (EET)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Dan Carpenter <dan.carpenter@...aro.org>, 
    Shravan Kumar Ramani <shravankr@...dia.com>
cc: Hans de Goede <hdegoede@...hat.com>, Vadim Pasternak <vadimp@...dia.com>, 
    platform-driver-x86@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>, 
    kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] platform/mellanox: mlxbf-pmc: fix signedness bugs

On Thu, 29 Feb 2024, Dan Carpenter wrote:

> These need to be signed for the error handling to work.  The
> mlxbf_pmc_get_event_num() function returns int so int type is correct.
> 
> Fixes: 1ae9ffd303c2 ("platform/mellanox: mlxbf-pmc: Cleanup signed/unsigned mix-up")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
> The code in mlxbf_pmc_valid_range() has a check for negatives but that
> has a signedness bug too.  Fortunately "(u32)-EINVAL + 8" will not
> result in an integer overflow so the offset is treated as invalid.

Hi,

While this patch itself was fine so I applied it, when reviewing the patch 
I noticed that some of the kstrtouint() derived values were not properly 
bound checked (some were fed directly to FIELD_PREP()).

-- 
 i.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ