Linux Lands Fix For AMD Zen 1 Bug That Could Leak Data After A Division By Zero
After a rather busy Patch Tuesday with the AMD Inception vulnerability and Intel Downfall going public, the Linux kernel saw a new bug fix merged today for a different issue... It turns out original AMD Zen 1 processors could end up leaking data in certain conditions after a divide by zero occurs.
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:
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.
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