Email me

Rust advisories / cortex-m-rt

Unsound MediumRUSTSEC-2023-0014 · cortex-m-rt

RUSTSEC-2023-0014: Miscompilation in cortex-m-rt 0.7.1 and 0.7.2

Short answercortex-m-rt has an API that can cause undefined behaviour from safe code: Miscompilation in cortex-m-rt 0.7.1 and 0.7.2. Fixed in 0.7.3.

Cratecortex-m-rt
TypeUnsound
Affected versionsFrom 0.7.1 before 0.7.3.
Fixed in0.7.3
SeverityMedium (GitHub rating)
Published2023-02-13
Last changed2023-11-08
Also known asGHSA-xw5j-gv2g-mjm2

What to do

  1. See which version you have: cargo tree -i cortex-m-rt (it also shows which of your dependencies pulls it in).
  2. Update within your version requirement: cargo update -p cortex-m-rt. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for example cortex-m-rt = "0.7.3") or update the dependency that pulls it in.
  3. Check again with cargo audit, or paste your Cargo.lock into our Cargo.toml checker.

Details from the advisory

Version 0.7.1 of the cortex-m-rt crate introduced a regression causing the stack to NOT be eight-byte aligned prior to calling main (or any other specified entrypoint), violating the stack ABI of AAPCS32, the default ABI used by all Cortex-M targets. This regression is also present in version 0.7.2 of the cortex-m-rt crate.

This regression can cause certain compiler optimizations (which assume the eight-byte alignment) to produce incorrect behavior at runtime. This incorrect behavior has been observed in real-world applications.

**It is advised that ALL users of v0.7.1 and v0.7.2 of the cortex-m-rt crate update to the latest version (v0.7.3), AS SOON AS POSSIBLE.** Users of v0.7.0 and prior versions of cortex-m-rt are not affected by this regression.

It will be necessary to rebuild all affected firmware binaries, and flash or deploy the new firmware binaries to affected devices.

References

From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.

Up next

Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ