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: <20251203211813.GAaTCpFeDir7jXkEPf@fat_crate.local>
Date: Wed, 3 Dec 2025 22:18:13 +0100
From: Borislav Petkov <bp@...en8.de>
To: Steven Noonan <steven@...inklabs.net>
Cc: linux-kernel@...r.kernel.org, Ariadne Conill <ariadne@...adne.space>,
	Yazen Ghannam <yazen.ghannam@....com>, x86@...r.kernel.org,
	stable@...r.kernel.org
Subject: Re: [PATCH 1/2] x86/amd_node: fix integer divide by zero during init

On Fri, Nov 14, 2025 at 07:57:35PM +0000, Steven Noonan wrote:
> On a Xen dom0 boot, this feature does not behave, and we end up
> calculating:
> 
>     num_roots = 1
>     num_nodes = 2
>     roots_per_node = 0
> 
> This causes a divide-by-zero in the modulus inside the loop.
> 
> This change adds a couple of guards for invalid states where we might
> get a divide-by-zero.
> 
> Signed-off-by: Steven Noonan <steven@...inklabs.net>
> Signed-off-by: Ariadne Conill <ariadne@...adne.space>
> CC: Yazen Ghannam <yazen.ghannam@....com>
> CC: x86@...r.kernel.org
> CC: stable@...r.kernel.org
> ---
>  arch/x86/kernel/amd_node.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/arch/x86/kernel/amd_node.c b/arch/x86/kernel/amd_node.c
> index 3d0a4768d603c..cdc6ba224d4ad 100644
> --- a/arch/x86/kernel/amd_node.c
> +++ b/arch/x86/kernel/amd_node.c
> @@ -282,6 +282,17 @@ static int __init amd_smn_init(void)

That better not be loading at all on a X86_FEATURE_HYPERVISOR configuration.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ