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: <062e6b9d-44ca-49e8-8be0-f6a853938c53@ideasonboard.com>
Date: Mon, 16 Dec 2024 12:05:43 +0200
From: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
To: Karol Przybylski <karprzy7@...il.com>, laurent.pinchart@...asonboard.com,
 maarten.lankhorst@...ux.intel.com, mripard@...nel.org, tzimmermann@...e.de,
 airlied@...il.com, simona@...ll.ch, michal.simek@....com
Cc: dri-devel@...ts.freedesktop.org, linux-arm-kernel@...ts.infradead.org,
 linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCHv3] drm: zynqmp_dp: Fix integer overflow in
 zynqmp_dp_rate_get()

Hi,

On 15/12/2024 14:53, Karol Przybylski wrote:
> This patch fixes a potential integer overflow in the zynqmp_dp_rate_get()
> 
> The issue comes up when the expression
> drm_dp_bw_code_to_link_rate(dp->test.bw_code) * 10000 is evaluated using 32-bit
> Now the constant is a compatible 64-bit type.
> 
> Resolves coverity issues: CID 1636340 and CID 1635811
> 
> Cc: stable@...r.kernel.org
> Fixes: 28edaacb821c6 ("drm: zynqmp_dp: Add debugfs interface for compliance testing")
> Signed-off-by: Karol Przybylski <karprzy7@...il.com>
> ---
> Changes from previous versions:
> Added Fixes tag
> Added Cc for stable kernel version
> Fixed formatting
> 
>   drivers/gpu/drm/xlnx/zynqmp_dp.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c
> index 25c5dc61ee88..56a261a40ea3 100644
> --- a/drivers/gpu/drm/xlnx/zynqmp_dp.c
> +++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c
> @@ -2190,7 +2190,7 @@ static int zynqmp_dp_rate_get(void *data, u64 *val)
>   	struct zynqmp_dp *dp = data;
>   
>   	mutex_lock(&dp->lock);
> -	*val = drm_dp_bw_code_to_link_rate(dp->test.bw_code) * 10000;
> +	*val = drm_dp_bw_code_to_link_rate(dp->test.bw_code) * 10000ULL;
>   	mutex_unlock(&dp->lock);
>   	return 0;
>   }

Thanks, pushed to drm-misc-next.

  Tomi


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ