CVE-2025-38670

EUVD-2025-25531
In the Linux kernel, the following vulnerability has been resolved:

arm64/entry: Mask DAIF in cpu_switch_to(), call_on_irq_stack()

`cpu_switch_to()` and `call_on_irq_stack()` manipulate SP to change
to different stacks along with the Shadow Call Stack if it is enabled.
Those two stack changes cannot be done atomically and both functions
can be interrupted by SErrors or Debug Exceptions which, though unlikely,
is very much broken : if interrupted, we can end up with mismatched stacks
and Shadow Call Stack leading to clobbered stacks.

In `cpu_switch_to()`, it can happen when SP_EL0 points to the new task,
but x18 stills points to the old task's SCS. When the interrupt handler
tries to save the task's SCS pointer, it will save the old task
SCS pointer (x18) into the new task struct (pointed to by SP_EL0),
clobbering it.

In `call_on_irq_stack()`, it can happen when switching from the task stack
to the IRQ stack and when switching back. In both cases, we can be
interrupted when the SCS pointer points to the IRQ SCS, but SP points to
the task stack. The nested interrupt handler pushes its return addresses
on the IRQ SCS. It then detects that SP points to the task stack,
calls `call_on_irq_stack()` and clobbers the task SCS pointer with
the IRQ SCS pointer, which it will also use !

This leads to tasks returning to addresses on the wrong SCS,
or even on the IRQ SCS, triggering kernel panics via CONFIG_VMAP_STACK
or FPAC if enabled.

This is possible on a default config, but unlikely.
However, when enabling CONFIG_ARM64_PSEUDO_NMI, DAIF is unmasked and
instead the GIC is responsible for filtering what interrupts the CPU
should receive based on priority.
Given the goal of emulating NMIs, pseudo-NMIs can be received by the CPU
even in `cpu_switch_to()` and `call_on_irq_stack()`, possibly *very*
frequently depending on the system configuration and workload, leading
to unpredictable kernel panics.

Completely mask DAIF in `cpu_switch_to()` and restore it when returning.
Do the same in `call_on_irq_stack()`, but restore and mask around
the branch.
Mask DAIF even if CONFIG_SHADOW_CALL_STACK is not enabled for consistency
of behaviour between all configurations.

Introduce and use an assembly macro for saving and masking DAIF,
as the existing one saves but only masks IF.
ProviderTypeBase ScoreAtk. VectorAtk. ComplexityPriv. RequiredVector
siemens-SADPADP
7.1 HIGH
LOCAL
LOW
LOW
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
Base Score
CVSS 3.x
EPSS Score
Percentile: 3%
Affected Products (NVD)
VendorProductVersion
linuxlinux_kernel
5.10.180 ≤
𝑥
< 5.10.210
linuxlinux_kernel
5.15.111 ≤
𝑥
< 5.15.190
linuxlinux_kernel
6.1.28 ≤
𝑥
< 6.1.149
linuxlinux_kernel
6.2.15 ≤
𝑥
< 6.6.101
linuxlinux_kernel
6.7 ≤
𝑥
< 6.12.41
linuxlinux_kernel
6.13 ≤
𝑥
< 6.15.9
linuxlinux_kernel
6.16:rc1
linuxlinux_kernel
6.16:rc2
linuxlinux_kernel
6.16:rc3
linuxlinux_kernel
6.16:rc4
linuxlinux_kernel
6.16:rc5
linuxlinux_kernel
6.16:rc6
linuxlinux_kernel
6.16:rc7
debiandebian_linux
11.0
𝑥
= Vulnerable software versions
Early Detection
Affected products identified ahead of NVD analysis through intelligence sources.
VendorProductVersionSource
SiemensSIMATIC CN 4100
𝑥
< V5.0
ADP
siemenssimatic_cn_4100
𝑥
< 5.0
ADP
Debian logo
Debian Releases
Debian Product
Codename
linux
bookworm
6.1.170-3
fixed
bookworm (security)
6.1.176-1
fixed
bullseye
5.10.223-1
fixed
bullseye (security)
5.10.259-1
fixed
forky
7.0.13-1
fixed
sid
7.1.3-1
fixed
trixie
6.12.86-1
fixed
trixie (security)
6.12.94-1
fixed
linux-6.1
bullseye (security)
6.1.176-1~deb11u1
fixed
openSUSE logo
openSUSE / SLES Releases
openSUSE Product
Release
kernel-64kb
suse enterprise desktop 15 SP6
6.4.0-150600.23.70.1
fixed
suse enterprise desktop 15 SP7
6.4.0-150700.53.16.1
fixed
suse enterprise sap 15 SP6
6.4.0-150600.23.70.1
fixed
suse enterprise sap 15 SP7
6.4.0-150700.53.16.1
fixed
suse enterprise server 15 SP6
6.4.0-150600.23.70.1
fixed
suse enterprise server 15 SP7
6.4.0-150700.53.16.1
fixed
kernel-azure
suse enterprise sap 15 SP6
6.4.0-150600.8.52.1
fixed
suse enterprise sap 15 SP7
6.4.0-150700.20.15.2
fixed
suse enterprise server 15 SP6
6.4.0-150600.8.52.1
fixed
suse enterprise server 15 SP7
6.4.0-150700.20.15.2
fixed
kernel-default
suse enterprise desktop 15 SP6
6.4.0-150600.23.70.1
fixed
suse enterprise desktop 15 SP7
6.4.0-150700.53.16.1
fixed
suse enterprise sap 15 SP6
6.4.0-150600.23.70.1
fixed
suse enterprise sap 15 SP7
6.4.0-150700.53.16.1
fixed
suse enterprise server 15 SP6
6.4.0-150600.23.70.1
fixed
suse enterprise server 15 SP7
6.4.0-150700.53.16.1
fixed
kernel-default-base
suse enterprise desktop 15 SP6
6.4.0-150600.23.70.1.150600.12.30.2
fixed
suse enterprise desktop 15 SP7
6.4.0-150700.53.16.1.150700.17.11.2
fixed
suse enterprise sap 15 SP6
6.4.0-150600.23.70.1.150600.12.30.2
fixed
suse enterprise sap 15 SP7
6.4.0-150700.53.16.1.150700.17.11.2
fixed
suse enterprise server 15 SP6
6.4.0-150600.23.70.1.150600.12.30.2
fixed
suse enterprise server 15 SP7
6.4.0-150700.53.16.1.150700.17.11.2
fixed
kernel-default-extra
suse enterprise desktop 15 SP6
6.4.0-150600.23.70.1
fixed
suse enterprise desktop 15 SP7
6.4.0-150700.53.16.1
fixed
suse enterprise sap 15 SP6
6.4.0-150600.23.70.1
fixed
suse enterprise sap 15 SP7
6.4.0-150700.53.16.1
fixed
suse enterprise server 15 SP6
6.4.0-150600.23.70.1
fixed
suse enterprise server 15 SP7
6.4.0-150700.53.16.1
fixed
suse enterprise workstation 15 SP6
6.4.0-150600.23.70.1
fixed
suse enterprise workstation 15 SP7
6.4.0-150700.53.16.1
fixed
kernel-obs-build
suse enterprise desktop 15 SP6
6.4.0-150600.23.70.1
fixed
suse enterprise desktop 15 SP7
6.4.0-150700.53.16.1
fixed
suse enterprise sap 15 SP6
6.4.0-150600.23.70.1
fixed
suse enterprise sap 15 SP7
6.4.0-150700.53.16.1
fixed
suse enterprise server 15 SP6
6.4.0-150600.23.70.1
fixed
suse enterprise server 15 SP7
6.4.0-150700.53.16.1
fixed
kernel-source
suse enterprise desktop 15 SP6
6.4.0-150600.23.70.1
fixed
suse enterprise desktop 15 SP7
6.4.0-150700.53.16.1
fixed
suse enterprise sap 15 SP6
6.4.0-150600.23.70.1
fixed
suse enterprise sap 15 SP7
6.4.0-150700.53.16.1
fixed
suse enterprise server 15 SP6
6.4.0-150600.23.70.1
fixed
suse enterprise server 15 SP7
6.4.0-150700.53.16.1
fixed
kernel-source-azure
suse enterprise sap 15 SP6
6.4.0-150600.8.52.1
fixed
suse enterprise sap 15 SP7
6.4.0-150700.20.15.2
fixed
suse enterprise server 15 SP6
6.4.0-150600.8.52.1
fixed
suse enterprise server 15 SP7
6.4.0-150700.20.15.2
fixed
kernel-zfcpdump
suse enterprise desktop 15 SP6
6.4.0-150600.23.70.1
fixed
suse enterprise desktop 15 SP7
6.4.0-150700.53.16.1
fixed
suse enterprise sap 15 SP6
6.4.0-150600.23.70.1
fixed
suse enterprise sap 15 SP7
6.4.0-150700.53.16.1
fixed
suse enterprise server 15 SP6
6.4.0-150600.23.70.1
fixed
suse enterprise server 15 SP7
6.4.0-150700.53.16.1
fixed
reiserfs-kmp-default
suse enterprise sap 15 SP7
6.4.0-150700.53.16.1
fixed
suse enterprise server 15 SP7
6.4.0-150700.53.16.1
fixed
Amazon Linux logo
Amazon Linux Releases
Amazon Package
Release
bpftool
Amazon Linux 2023
1:6.1.150-174.273.amzn2023
fixed
bpftool-debuginfo
Amazon Linux 2023
1:6.1.150-174.273.amzn2023
fixed
bpftool6.12
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
bpftool6.12-debuginfo
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel
Amazon Linux 2023
1:6.1.150-174.273.amzn2023
fixed
kernel-debuginfo
Amazon Linux 2023
1:6.1.150-174.273.amzn2023
fixed
kernel-debuginfo-common-aarch64
Amazon Linux 2023
1:6.1.150-174.273.amzn2023
fixed
kernel-debuginfo-common-x86_64
Amazon Linux 2023
1:6.1.150-174.273.amzn2023
fixed
kernel-devel
Amazon Linux 2023
1:6.1.150-174.273.amzn2023
fixed
kernel-headers
Amazon Linux 2023
1:6.1.150-174.273.amzn2023
fixed
kernel-libbpf
Amazon Linux 2023
1:6.1.150-174.273.amzn2023
fixed
kernel-libbpf-debuginfo
Amazon Linux 2023
1:6.1.150-174.273.amzn2023
fixed
kernel-libbpf-devel
Amazon Linux 2023
1:6.1.150-174.273.amzn2023
fixed
kernel-libbpf-static
Amazon Linux 2023
1:6.1.150-174.273.amzn2023
fixed
kernel-livepatch-6.1.150-174.273
Amazon Linux 2023
1:1.0-0.amzn2023
fixed
kernel-livepatch-6.12.46-66.121
Amazon Linux 2023
1:1.0-0.amzn2023
fixed
kernel-modules-extra
Amazon Linux 2023
1:6.1.150-174.273.amzn2023
fixed
kernel-modules-extra-common
Amazon Linux 2023
1:6.1.150-174.273.amzn2023
fixed
kernel-tools
Amazon Linux 2023
1:6.1.150-174.273.amzn2023
fixed
kernel-tools-debuginfo
Amazon Linux 2023
1:6.1.150-174.273.amzn2023
fixed
kernel-tools-devel
Amazon Linux 2023
1:6.1.150-174.273.amzn2023
fixed
kernel6.12
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-debuginfo
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-debuginfo-common-aarch64
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-debuginfo-common-x86_64
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-devel
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-headers
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-libbpf
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-libbpf-debuginfo
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-libbpf-devel
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-libbpf-static
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-modules-extra
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-modules-extra-common
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-tools
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-tools-debuginfo
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-tools-devel
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
perf
Amazon Linux 2023
1:6.1.150-174.273.amzn2023
fixed
perf-debuginfo
Amazon Linux 2023
1:6.1.150-174.273.amzn2023
fixed
perf6.12
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
perf6.12-debuginfo
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
python3-perf
Amazon Linux 2023
1:6.1.150-174.273.amzn2023
fixed
python3-perf-debuginfo
Amazon Linux 2023
1:6.1.150-174.273.amzn2023
fixed
python3-perf6.12
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
python3-perf6.12-debuginfo
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
Azure Linux logo
Azure Linux Releases
Azure Package
Release
kernel
Azure Linux 3.0
0:6.6.104.2-1.azl3
fixed
CBL-Mariner 2.0
0:5.15.200.1-1.cm2
fixed