Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2025-38670— arm64/entry: Mask DAIF in cpu_switch_to(), call_on_irq_stack()

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于未屏蔽DAIF标志,可能导致堆栈不匹配。

CVSS 7.8 · High EPSS 0.17% · P6

Possible ATT&CK Techniques 1 AI

T1059 · Command and Scripting Interpreter

Affected Version Matrix 21

VendorProduct Version RangeStatus
Linux Linux 3f225f29c69c13ce1cbdb1d607a42efeef080056< f7e0231eeaa33245c649fac0303cf97209605446 affected
402d2b1d54b7085d0c3bfd01fd50c2701dde64b3< 407047893a64399f2d2390ff35cc6061107d805d affected
4403c7b7e5e1ad09a266b6e399fd7bf97931508e< a6b0cb523eaa01efe8a3f76ced493ba60674c6e6 affected
59b37fe52f49955791a460752c37145f1afdcad1< 9433a5f437b0948d6a2d8a02ad7a42ab7ca27a61 affected
59b37fe52f49955791a460752c37145f1afdcad1< 708fd522b86d2a9544c34ec6a86fa3fc23336525 affected
59b37fe52f49955791a460752c37145f1afdcad1< 0f67015d72627bad72da3c2084352e0aa134416b affected
59b37fe52f49955791a460752c37145f1afdcad1< d42e6c20de6192f8e4ab4cf10be8c694ef27e8cb affected
e47ce4f11e26fa3ea99b09521da8b3ac3a7b578d affected
… +13 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2025-38670

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
arm64/entry: Mask DAIF in cpu_switch_to(), call_on_irq_stack()
Source: CVE Program / CVE List V5
Vulnerability Description
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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于未屏蔽DAIF标志,可能导致堆栈不匹配。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Linux Linux 3f225f29c69c13ce1cbdb1d607a42efeef080056 ~ f7e0231eeaa33245c649fac0303cf97209605446 -
Linux Linux 6.3 -

II. Public POCs for CVE-2025-38670

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2025-38670

请登录查看更多情报信息。

Same Patch Batch · Linux · 2025-08-22 · 60 CVEs total

CVE-2025-38660 9.8 CRITICAL [ceph] parse_longname(): strrchr() expects NUL-terminated string
CVE-2025-38643 8.8 HIGH wifi: cfg80211: Add missing lock in cfg80211_check_and_end_cac()
CVE-2025-38658 8.8 HIGH nvmet: pci-epf: Do not complete commands twice if nvmet_req_init() fails
CVE-2024-58239 8.2 HIGH tls: stop recv() if initial process_rx_list gave us non-DATA
CVE-2025-38640 7.8 HIGH bpf: Disable migration in nf_hook_run_bpf().
CVE-2025-38675 7.8 HIGH xfrm: state: initialize state_ptrs earlier in xfrm_state_find
CVE-2025-38627 7.8 HIGH f2fs: compress: fix UAF of f2fs_inode_info in f2fs_free_dic
CVE-2025-38653 7.8 HIGH proc: use the same treatment to check proc_lseek as ones for proc_read_iter et.al
CVE-2025-38659 7.8 HIGH gfs2: No more self recovery
CVE-2025-38656 7.8 HIGH wifi: iwlwifi: Fix error code in iwl_op_mode_dvm_start()
CVE-2025-38619 7.8 HIGH media: ti: j721e-csi2rx: fix list_del corruption
CVE-2025-38617 7.8 HIGH net/packet: fix a race in packet_set_ring() and packet_notifier()
CVE-2025-38618 7.8 HIGH vsock: Do not allow binding to VMADDR_PORT_ANY
CVE-2025-38667 7.8 HIGH iio: fix potential out-of-bound write
CVE-2025-38616 7.8 HIGH tls: handle data disappearing from under the TLS ULP
CVE-2025-38652 7.3 HIGH f2fs: fix to avoid out-of-boundary access in devs.path
CVE-2025-38657 7.3 HIGH wifi: rtw89: mcc: prevent shift wrapping in rtw89_core_mlsr_switch()
CVE-2025-38661 7.1 HIGH platform/x86: alienware-wmi-wmax: Fix `dmi_system_id` array
CVE-2025-38662 7.1 HIGH ASoC: mediatek: mt8365-dai-i2s: pass correct size to mt8365_dai_set_priv
CVE-2025-38639 7.1 HIGH netfilter: xt_nfacct: don't assume acct name is null-terminated

Showing top 20 of 60 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2025-38670

No comments yet


Leave a comment