Linux Lands Fix For AMD Zen 1 Bug That Could Leak Data After A Division By Zero
![AMD](/assets/categories/amd.webp)
Longtime AMD Linux developer Borislav Petkov authored a kernel patch to workaround this AMD Zen 1 bug for the Ryzen 1000 series and EPYC 7001 series processors. In the commit he explains:
x86/CPU/AMD: Do not leak quotient data after a division by 0
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.
In the code this issue is simply referred to as the "AMD DIV0 speculation bug."
The dummy division 0/1 is set to happen only for AMD Zen 1 processors. A kernel message added by this patch also notes that disabling Symmetric Multi-Threading (SMT) is the way to achieve "full" protection against this divide by zero issue.
This patch was merged a few minutes ago for Linux 6.5 Git while is also marked for back-porting to all the stable Linux kernel series.
11 Comments