Commit d3a5e492 authored by Borislav Petkov (AMD)'s avatar Borislav Petkov (AMD) Committed by Jialin Zhang
Browse files

x86/CPU/AMD: Do not leak quotient data after a division by 0

stable inclusion
from stable-v5.10.190
commit b6fc2fbf89089ecfb8eb9a89a7fc91d444f4fec7
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I7WY4J
CVE: CVE-2023-20588

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b6fc2fbf89089ecfb8eb9a89a7fc91d444f4fec7



--------------------------------

commit 77245f1c upstream.

Under certain circumstances, an integer division by 0 which faults, can
leave stale quotient data from a previous division operation on Zen1
microarchitectures.

Do a dummy division 0/1 before returning from the #DE exception handler
in order to avoid any leaks of potentially sensitive data.

Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Cc: <stable@kernel.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

 Conflicts:
	arch/x86/include/asm/cpufeatures.h
	arch/x86/include/asm/processor.h

Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parent f5d546f4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment