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: <5370E3AB.7090306@samsung.com>
Date:	Mon, 12 May 2014 17:07:23 +0200
From:	Sylwester Nawrocki <s.nawrocki@...sung.com>
To:	Antoine Ténart 
	<antoine.tenart@...e-electrons.com>
Cc:	kgene.kim@...sung.com, kishon@...com, sylvester.nawrocki@...il.com,
	linux-arm-kernel@...ts.infradead.org,
	linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] phy: exynos-mipi-video: fix check on array index

On 12/05/14 14:56, Antoine Ténart wrote:
> The phys array is of size EXYNOS_MIPI_PHYS_NUM. Trying to access the
> index EXYNOS_MIPI_PHYS_NUM should return an error.
> 
> Fixes: 069d2e26e9d6 "phy: Add driver for Exynos MIPI CSIS/DSIM DPHYs"
> 
> Signed-off-by: Antoine Ténart <antoine.tenart@...e-electrons.com>

Thanks for the fix,

Acked-by: Sylwester Nawrocki <s.nawrocki@...sung.com>

> ---
>  drivers/phy/phy-exynos-mipi-video.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/phy/phy-exynos-mipi-video.c b/drivers/phy/phy-exynos-mipi-video.c
> index 7f139326a642..ff026689358c 100644
> --- a/drivers/phy/phy-exynos-mipi-video.c
> +++ b/drivers/phy/phy-exynos-mipi-video.c
> @@ -101,7 +101,7 @@ static struct phy *exynos_mipi_video_phy_xlate(struct device *dev,
>  {
>  	struct exynos_mipi_video_phy *state = dev_get_drvdata(dev);
>  
> -	if (WARN_ON(args->args[0] > EXYNOS_MIPI_PHYS_NUM))
> +	if (WARN_ON(args->args[0] >= EXYNOS_MIPI_PHYS_NUM))
>  		return ERR_PTR(-ENODEV);
>  
>  	return state->phys[args->args[0]].phy;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ