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]
Message-ID: <86frllwilm.wl-maz@kernel.org>
Date: Tue, 14 Jan 2025 14:55:17 +0000
From: Marc Zyngier <maz@...nel.org>
To: Sebastian Ene <sebastianene@...gle.com>
Cc: catalin.marinas@....com,
	joey.gouly@....com,
	kvmarm@...ts.linux.dev,
	linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org,
	oliver.upton@...ux.dev,
	suzuki.poulose@....com,
	will@...nel.org,
	yuzenghui@...wei.com
Subject: Re: [PATCH] KVM: arm64: Fix the upper limit of the walker range

On Tue, 14 Jan 2025 14:50:51 +0000,
Sebastian Ene <sebastianene@...gle.com> wrote:
> 
> Prevent the walker from running into weeds when walking an
> entire address range.
> 
> Signed-off-by: Sebastian Ene <sebastianene@...gle.com>
> ---
>  arch/arm64/kvm/hyp/pgtable.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/kvm/hyp/pgtable.c b/arch/arm64/kvm/hyp/pgtable.c
> index 40bd55966..2ffb5571e 100644
> --- a/arch/arm64/kvm/hyp/pgtable.c
> +++ b/arch/arm64/kvm/hyp/pgtable.c
> @@ -260,7 +260,7 @@ static int _kvm_pgtable_walk(struct kvm_pgtable *pgt, struct kvm_pgtable_walk_da
>  {
>  	u32 idx;
>  	int ret = 0;
> -	u64 limit = BIT(pgt->ia_bits);
> +	u64 limit = BIT(pgt->ia_bits) - 1;
>  
>  	if (data->addr > limit || data->end > limit)
>  		return -ERANGE;

Huh, nice catch. I guess this deserves a

Fixes: b1e57de62cfb4 ("KVM: arm64: Add stand-alone page-table walker infrastructure")
Cc: stable@...r.kernel.org

right?

	M.

-- 
Without deviation from the norm, progress is not possible.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ