Rapid7 Vulnerability & Exploit Database

Ubuntu: (Multiple Advisories) (CVE-2024-26670): Linux kernel (OEM) vulnerabilities

Free InsightVM Trial No Credit Card Necessary
2024 Attack Intel Report Latest research by Rapid7 Labs
Back to Search

Ubuntu: (Multiple Advisories) (CVE-2024-26670): Linux kernel (OEM) vulnerabilities

Severity
4
CVSS
(AV:L/AC:M/Au:N/C:P/I:P/A:P)
Published
04/02/2024
Created
05/18/2024
Added
05/17/2024
Modified
07/15/2024

Description

In the Linux kernel, the following vulnerability has been resolved: arm64: entry: fix ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD Currently the ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD workaround isn't quite right, as it is supposed to be applied after the last explicit memory access, but is immediately followed by an LDR. The ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD workaround is used to handle Cortex-A520 erratum 2966298 and Cortex-A510 erratum 3117295, which are described in: * https://developer.arm.com/documentation/SDEN2444153/0600/?lang=en * https://developer.arm.com/documentation/SDEN1873361/1600/?lang=en In both cases the workaround is described as: | If pagetable isolation is disabled, the context switch logic in the | kernel can be updated to execute the following sequence on affected | cores before exiting to EL0, and after all explicit memory accesses: | | 1. A non-shareable TLBI to any context and/or address, including | unused contexts or addresses, such as a `TLBI VALE1 Xzr`. | | 2. A DSB NSH to guarantee completion of the TLBI. The important part being that the TLBI+DSB must be placed "after all explicit memory accesses". Unfortunately, as-implemented, the TLBI+DSB is immediately followed by an LDR, as we have: | alternative_if ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD | tlbi vale1, xzr | dsb nsh | alternative_else_nop_endif | alternative_if_not ARM64_UNMAP_KERNEL_AT_EL0 | ldr lr, [sp, #S_LR] | add sp, sp, #PT_REGS_SIZE // restore sp | eret | alternative_else_nop_endif | | [ ... KPTI exception return path ... ] This patch fixes this by reworking the logic to place the TLBI+DSB immediately before the ERET, after all explicit memory accesses. The ERET is currently in a separate alternative block, and alternatives cannot be nested. To account for this, the alternative block for ARM64_UNMAP_KERNEL_AT_EL0 is replaced with a single alternative branch to skip the KPTI logic, with the new shape of the logic being: | alternative_insn "b .L_skip_tramp_exit_\@", nop, ARM64_UNMAP_KERNEL_AT_EL0 | [ ... KPTI exception return path ... ] | .L_skip_tramp_exit_\@: | | ldr lr, [sp, #S_LR] | add sp, sp, #PT_REGS_SIZE // restore sp | | alternative_if ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD | tlbi vale1, xzr | dsb nsh | alternative_else_nop_endif | eret The new structure means that the workaround is only applied when KPTI is not in use; this is fine as noted in the documented implications of the erratum: | Pagetable isolation between EL0 and higher level ELs prevents the | issue from occurring. ... and as per the workaround description quoted above, the workaround is only necessary "If pagetable isolation is disabled".

Solution(s)

  • ubuntu-upgrade-linux-image-6-5-0-1015-starfive
  • ubuntu-upgrade-linux-image-6-5-0-1017-laptop
  • ubuntu-upgrade-linux-image-6-5-0-1018-raspi
  • ubuntu-upgrade-linux-image-6-5-0-1021-aws
  • ubuntu-upgrade-linux-image-6-5-0-1021-nvidia
  • ubuntu-upgrade-linux-image-6-5-0-1021-nvidia-64k
  • ubuntu-upgrade-linux-image-6-5-0-1022-azure
  • ubuntu-upgrade-linux-image-6-5-0-1022-azure-fde
  • ubuntu-upgrade-linux-image-6-5-0-1022-gcp
  • ubuntu-upgrade-linux-image-6-5-0-1022-oem
  • ubuntu-upgrade-linux-image-6-5-0-1024-oem
  • ubuntu-upgrade-linux-image-6-5-0-1024-oracle
  • ubuntu-upgrade-linux-image-6-5-0-1024-oracle-64k
  • ubuntu-upgrade-linux-image-6-5-0-41-generic
  • ubuntu-upgrade-linux-image-6-5-0-41-generic-64k
  • ubuntu-upgrade-linux-image-6-5-0-41-lowlatency
  • ubuntu-upgrade-linux-image-6-5-0-41-lowlatency-64k
  • ubuntu-upgrade-linux-image-aws
  • ubuntu-upgrade-linux-image-azure
  • ubuntu-upgrade-linux-image-azure-fde
  • ubuntu-upgrade-linux-image-gcp
  • ubuntu-upgrade-linux-image-generic
  • ubuntu-upgrade-linux-image-generic-64k
  • ubuntu-upgrade-linux-image-generic-64k-hwe-22-04
  • ubuntu-upgrade-linux-image-generic-hwe-22-04
  • ubuntu-upgrade-linux-image-generic-lpae
  • ubuntu-upgrade-linux-image-kvm
  • ubuntu-upgrade-linux-image-laptop-23-10
  • ubuntu-upgrade-linux-image-lowlatency
  • ubuntu-upgrade-linux-image-lowlatency-64k
  • ubuntu-upgrade-linux-image-lowlatency-64k-hwe-22-04
  • ubuntu-upgrade-linux-image-lowlatency-hwe-22-04
  • ubuntu-upgrade-linux-image-nvidia-6-5
  • ubuntu-upgrade-linux-image-nvidia-64k-6-5
  • ubuntu-upgrade-linux-image-nvidia-64k-hwe-22-04
  • ubuntu-upgrade-linux-image-nvidia-hwe-22-04
  • ubuntu-upgrade-linux-image-oem-22-04
  • ubuntu-upgrade-linux-image-oem-22-04a
  • ubuntu-upgrade-linux-image-oem-22-04b
  • ubuntu-upgrade-linux-image-oem-22-04c
  • ubuntu-upgrade-linux-image-oem-22-04d
  • ubuntu-upgrade-linux-image-oracle
  • ubuntu-upgrade-linux-image-oracle-64k
  • ubuntu-upgrade-linux-image-raspi
  • ubuntu-upgrade-linux-image-raspi-nolpae
  • ubuntu-upgrade-linux-image-starfive
  • ubuntu-upgrade-linux-image-virtual
  • ubuntu-upgrade-linux-image-virtual-hwe-22-04

With Rapid7 live dashboards, I have a clear view of all the assets on my network, which ones can be exploited, and what I need to do in order to reduce the risk in my environment in real-time. No other tool gives us that kind of value and insight.

– Scott Cheney, Manager of Information Security, Sierra View Medical Center

;