CVE-2024-36936: efi/unaccepted: touch soft lockup during memory accept
In the Linux kernel, the following vulnerability has been resolved:
efi/unaccepted: touch soft lockup during memory accept
Commit 50e782a86c98 ("efi/unaccepted: Fix soft lockups caused by parallel memory acceptance") has released the spinlock so other CPUs can do memory acceptance in parallel and not triggers softlockup on other CPUs.
However the softlock up was intermittent shown up if the memory of the TD guest is large, and the timeout of softlockup is set to 1 second:
RIP: 0010:rawspinunlockirqrestore Call Trace: ? hrtimerrunqueues <IRQ> ? hrtimerinterrupt ? watchdogtimerfn ? sysvecapictimerinterrupt ? pfxwatchdogtimerfn ? sysvecapictimerinterrupt </IRQ> ? hrtimerrunqueues <TASK> ? hrtimerinterrupt ? asmsysvecapictimerinterrupt ? rawspinunlockirqrestore ? sysvecapictimerinterrupt ? sysvecapictimerinterrupt acceptmemory trytoacceptmemory dohugepmdanonymouspage getpagefromfreelist handlemmfault allocpages folioalloc ? tdxhypercall handlemmfault vmaallocfolio douseraddrfault dohugepmdanonymouspage excpagefault ? dohugepmdanonymouspage asmexcpagefault handlemmfault
When the local irq is enabled at the end of acceptmemory(), the softlockup detects that the watchdog on single CPU has not been fed for a while. That is to say, even other CPUs will not be blocked by spinlock, the current CPU might be stunk with local irq disabled for a while, which hurts not only nmi watchdog but also softlockup.
Chao Gao pointed out that the memory accept could be time costly and there was similar report before. Thus to avoid any softlocup detection during this stage, give the softlockup a flag to skip the timeout check at the end of acceptmemory(), by invoking touchsoftlockupwatchdog().
Other sources
In the Linux kernel, the following vulnerability has been resolved:
efi/unaccepted: touch soft lockup during memory accept
The Linux kernel CVE team has assigned CVE-2024-36936 to this issue.
Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024053042-CVE-2024-36936-3116@gregkh/T
— Red Hat
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-36936?
CVE-2024-36936 has a medium severity due to its potential to cause system instability.
How do I fix CVE-2024-36936?
To address CVE-2024-36936, upgrade the kernel to version 6.8.10 or higher for Red Hat, or update to specific Debian package versions.
What systems are affected by CVE-2024-36936?
CVE-2024-36936 affects Red Hat kernel versions below 6.8.10 and 6.9, as well as certain versions of Debian's Linux package.
What does CVE-2024-36936 impact in the Linux kernel?
CVE-2024-36936 impacts the memory acceptance process, potentially causing soft lockups.
Who is responsible for fixing CVE-2024-36936?
It is the responsibility of the system administrator to apply the necessary kernel updates to fix CVE-2024-36936.