Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Mirantis reveals Lens Prism, an AI copilot for operating Kubernetes clusters

      July 3, 2025

      Avoid these common platform engineering mistakes

      July 3, 2025

      Full-Stack Techies vs Toptal: Which Is Better for React.js Outsourcing?

      July 3, 2025

      The AI productivity paradox in software engineering: Balancing efficiency and human skill retention

      July 2, 2025

      Microsoft Gaming studios head Matt Booty says “overall portfolio strategy is unchanged” — with more than 40 games in production

      July 3, 2025

      Capcom reports that its Steam game sales have risen massively — despite flagship titles like Monster Hunter Wilds receiving profuse backlash from PC players

      July 3, 2025

      Cloudflare is fighting to safeguard “the future of the web itself” — standing directly in the way of leading AI firms

      July 3, 2025

      Microsoft reportedly lacks the know-how to fully leverage OpenAI’s tech — despite holding IP rights

      July 3, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      PHP 8.5.0 Alpha 1 available for testing

      July 3, 2025
      Recent

      PHP 8.5.0 Alpha 1 available for testing

      July 3, 2025

      Recording cross browser compatible media

      July 3, 2025

      Celebrating Perficient’s Third Databricks Champion

      July 3, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Microsoft Gaming studios head Matt Booty says “overall portfolio strategy is unchanged” — with more than 40 games in production

      July 3, 2025
      Recent

      Microsoft Gaming studios head Matt Booty says “overall portfolio strategy is unchanged” — with more than 40 games in production

      July 3, 2025

      Capcom reports that its Steam game sales have risen massively — despite flagship titles like Monster Hunter Wilds receiving profuse backlash from PC players

      July 3, 2025

      Cloudflare is fighting to safeguard “the future of the web itself” — standing directly in the way of leading AI firms

      July 3, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Security»Common Vulnerabilities and Exposures (CVEs)»CVE-2025-38170 – Linux kernel – arm64 FPSIMD SME Trap Handling Stale CPU State Vulnerability

    CVE-2025-38170 – Linux kernel – arm64 FPSIMD SME Trap Handling Stale CPU State Vulnerability

    July 3, 2025

    CVE ID : CVE-2025-38170

    Published : July 3, 2025, 9:15 a.m. | 2 hours, 14 minutes ago

    Description : In the Linux kernel, the following vulnerability has been resolved:

    arm64/fpsimd: Discard stale CPU state when handling SME traps

    The logic for handling SME traps manipulates saved FPSIMD/SVE/SME state
    incorrectly, and a race with preemption can result in a task having
    TIF_SME set and TIF_FOREIGN_FPSTATE clear even though the live CPU state
    is stale (e.g. with SME traps enabled). This can result in warnings from
    do_sme_acc() where SME traps are not expected while TIF_SME is set:

    | /* With TIF_SME userspace shouldn’t generate any traps */
    | if (test_and_set_thread_flag(TIF_SME))
    | WARN_ON(1);

    This is very similar to the SVE issue we fixed in commit:

    751ecf6afd6568ad (“arm64/sve: Discard stale CPU state when handling SVE traps”)

    The race can occur when the SME trap handler is preempted before and
    after manipulating the saved FPSIMD/SVE/SME state, starting and ending on
    the same CPU, e.g.

    | void do_sme_acc(unsigned long esr, struct pt_regs *regs)
    | {
    | // Trap on CPU 0 with TIF_SME clear, SME traps enabled
    | // task->fpsimd_cpu is 0.
    | // per_cpu_ptr(&fpsimd_last_state, 0) is task.
    |
    | …
    |
    | // Preempted; migrated from CPU 0 to CPU 1.
    | // TIF_FOREIGN_FPSTATE is set.
    |
    | get_cpu_fpsimd_context();
    |
    | /* With TIF_SME userspace shouldn’t generate any traps */
    | if (test_and_set_thread_flag(TIF_SME))
    | WARN_ON(1);
    |
    | if (!test_thread_flag(TIF_FOREIGN_FPSTATE)) {
    | unsigned long vq_minus_one =
    | sve_vq_from_vl(task_get_sme_vl(current)) – 1;
    | sme_set_vq(vq_minus_one);
    |
    | fpsimd_bind_task_to_cpu();
    | }
    |
    | put_cpu_fpsimd_context();
    |
    | // Preempted; migrated from CPU 1 to CPU 0.
    | // task->fpsimd_cpu is still 0
    | // If per_cpu_ptr(&fpsimd_last_state, 0) is still task then:
    | // – Stale HW state is reused (with SME traps enabled)
    | // – TIF_FOREIGN_FPSTATE is cleared
    | // – A return to userspace skips HW state restore
    | }

    Fix the case where the state is not live and TIF_FOREIGN_FPSTATE is set
    by calling fpsimd_flush_task_state() to detach from the saved CPU
    state. This ensures that a subsequent context switch will not reuse the
    stale CPU state, and will instead set TIF_FOREIGN_FPSTATE, forcing the
    new state to be reloaded from memory prior to a return to userspace.

    Note: this was originallly posted as [1].

    [ Rutland: rewrite commit message ]

    Severity: 0.0 | NA

    Visit the link for more details, such as CVSS details, affected products, timeline, and more…

    Source: Read More

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleCVE-2025-38171 – Linux Power Supply Driver Max77705 Workqueue Vulnerability
    Next Article CVE-2025-38169 – Linux Kernel ARM64 FPSIMD State Clobbering Vulnerability

    Related Posts

    Security

    DjVuLibre-lek laat aanvaller code op Linux-desktops uitvoeren

    July 4, 2025
    Security

    Critical Sudo Vulnerabilities Let Local Users Gain Root Access on Linux, Impacting Major Distros

    July 4, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    CVE-2025-53093 – TabberNeue Cross-Site Scripting (XSS)

    Common Vulnerabilities and Exposures (CVEs)

    Microsoft’s Bing share is now 12.2%, Google drops to 79.10%, and it’s not due to ChatGPT

    Operating Systems

    CVE-2025-46690 – Ververica Platform SQL Connector Unauthorized Access Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    FACTS Grounding: A new benchmark for evaluating the factuality of large language models

    Artificial Intelligence

    Highlights

    Best early Prime Day Kindle deals: My 6 favorite sales live now

    June 18, 2025

    Shop these early deals on Kindle e-readers, as we keep an eye out for major…

    Ringdove is an EDA suite of multiple software components

    April 8, 2025

    CVE-2025-5842 – WordPress Modern Design Library Stored Cross-Site Scripting Vulnerability

    June 26, 2025

    CVE-2025-48132 – Pencilwp X Addons for Elementor Cross-site Scripting

    May 16, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.