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]
Date:   Tue, 24 Apr 2018 21:48:26 -0700
From:   Bjorn Andersson <bjorn.andersson@...aro.org>
To:     Alex Elder <elder@...aro.org>
Cc:     andy.gross@...aro.org, clew@...eaurora.org, aneela@...eaurora.org,
        david.brown@...aro.org, linux-arm-msm@...r.kernel.org,
        linux-soc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/6] soc: qcom: smem: fix off-by-one error in
 qcom_smem_alloc_private()

On Tue 10 Apr 15:25 PDT 2018, Alex Elder wrote:

> It's OK if the space for a newly-allocated uncached entry actually
> touches the free cached space boundary.  It's only a problem if it
> would cross it.
> 
> Signed-off-by: Alex Elder <elder@...aro.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@...aro.org>

Regards,
Bjorn

> ---
>  drivers/soc/qcom/smem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c
> index 82f0908b90e1..0ed263055988 100644
> --- a/drivers/soc/qcom/smem.c
> +++ b/drivers/soc/qcom/smem.c
> @@ -375,7 +375,7 @@ static int qcom_smem_alloc_private(struct qcom_smem *smem,
>  
>  	/* Check that we don't grow into the cached region */
>  	alloc_size = sizeof(*hdr) + ALIGN(size, 8);
> -	if ((void *)hdr + alloc_size >= cached) {
> +	if ((void *)hdr + alloc_size > cached) {
>  		dev_err(smem->dev, "Out of memory\n");
>  		return -ENOSPC;
>  	}
> -- 
> 2.14.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ