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

      The Psychology Of Color In UX Design And Digital Products

      August 15, 2025

      This week in AI dev tools: Claude Sonnet 4’s larger context window, ChatGPT updates, and more (August 15, 2025)

      August 15, 2025

      Sentry launches MCP monitoring tool

      August 14, 2025

      10 Benefits of Hiring a React.js Development Company (2025–2026 Edition)

      August 13, 2025

      Your smart home device just got a performance and security boost for free

      August 18, 2025

      Ultrahuman brings advanced cycle and ovulation tracking to its smart ring

      August 18, 2025

      DistroWatch Weekly, Issue 1135

      August 17, 2025

      14 secret phone codes that unlock hidden features on your Android and iPhone

      August 17, 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

      Air Quality Prediction System using Python ML

      August 17, 2025
      Recent

      Air Quality Prediction System using Python ML

      August 17, 2025

      AI’s Hidden Thirst: The Water Behind Tech

      August 16, 2025

      Minesweeper game in 100 lines of pure JavaScript – easy tutorial

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

      DistroWatch Weekly, Issue 1135

      August 17, 2025
      Recent

      DistroWatch Weekly, Issue 1135

      August 17, 2025

      Ubuntu’s New “Dangerous” Daily Builds – What Are They?

      August 17, 2025

      gofmt – formats Go programs

      August 17, 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

    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-9090 – Tenda Telnet Service Command Injection

    August 17, 2025
    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-9091 – Tenda AC20 Hard-Coded Credentials Vulnerability

    August 17, 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

    Sharp – High performance Node.js image processing

    Development

    Escritoire creates standards-compliant letters

    Linux

    SmartOS – Type 1 Hypervisor platform based on illumos

    Linux

    CVE-2025-20130 – “Cisco ISE File Upload Vulnerability”

    Common Vulnerabilities and Exposures (CVEs)

    Highlights

    I tested the world’s thinnest SSD enclosure – here’s why it’s the perfect PC accessory for me

    June 20, 2025

    Sharge came up with a sleek and stylish way to have up to 4TB of…

    CVE-2025-5711 – Real Estate Property Management System SQL Injection Vulnerability

    June 5, 2025

    First $1B business with one human employee will happen in 2026, says Anthropic CEO

    May 22, 2025

    I was skeptical of clip-style earbuds, then I took this budget pair on a run

    April 1, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

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