Vulnerability DatabaseGHSA-xw5j-gv2g-mjm2

GHSA-xw5j-gv2g-mjm2
Rust vulnerability analysis and mitigation

Overview

A regression vulnerability was identified in cortex-m-rt versions 0.7.1 and 0.7.2, affecting stack alignment in Cortex-M targets. The issue was discovered in February 2023 and was assigned the identifier GHSA-xw5j-gv2g-mjm2. The vulnerability causes the stack to not maintain eight-byte alignment before calling the main function or other specified entrypoints, which violates the stack ABI of AAPCS32, the default ABI used by all Cortex-M targets (GitHub Advisory, RustSec Advisory).

Technical details

The vulnerability stems from a violation of the AAPCS32 stack ABI requirements, specifically affecting stack alignment. The issue impacts all Cortex-M targets including thumbv6m-none-eabi, thumbv7m-none-eabi, thumbv7em-none-eabi, thumbv7em-none-eabihf, thumbv8m.base-none-eabi, thumbv8m.main-none-eabi, and thumbv8m.main-none-eabihf. The regression was introduced in version 0.7.1 and persisted through version 0.7.2. The severity is classified as Moderate (GitHub Discussion).

Impact

The misalignment issue can trigger compiler optimizations that assume eight-byte alignment, resulting in incorrect behavior at runtime. This incorrect behavior has been observed in real-world applications, potentially affecting any firmware using the affected versions of cortex-m-rt. Users of probe-run v0.3.6 and earlier may also experience warning messages when stack unwinding goes past the main function (GitHub Discussion).

Mitigation and workarounds

The issue has been patched in version 0.7.3 of cortex-m-rt. Users of versions 0.7.1 and 0.7.2 are strongly advised to update to version 0.7.3 or later as soon as possible. The update can be applied using the cargo-update command or by manually editing the Cargo.toml file. After updating, all affected firmware binaries must be rebuilt and redeployed to affected devices (GitHub Discussion).

Community reactions

The vulnerability was discovered by peter9477, with significant contributions from the Rust Embedded Matrix community. James Munns wrote the advisory and helped research the impact and solutions, while Dirbaio developed the fix. The community response was swift, leading to a coordinated disclosure and patch release (GitHub Discussion).

Additional resources


SourceThis report was generated using AI

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66627HIGH8.4
  • RustRust
  • wasmi
NoYesDec 09, 2025
GHSA-xrv8-2pf5-f3q7MEDIUM6
  • RustRust
  • nitro-tpm-pcr-compute
NoYesDec 05, 2025
CVE-2025-67487MEDIUM5.5
  • RustRust
  • static-web-server
NoYesDec 09, 2025
CVE-2025-66622LOW1.3
  • RustRust
  • matrix-sdk-base
NoYesDec 09, 2025
RUSTSEC-2025-0135N/AN/A
  • RustRust
  • matrix-sdk-base
NoYesDec 08, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management