You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RalfJung opened this issue
Oct 5, 2024
· 4 comments
Labels
I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessO-AArch64Armv8-A or later processors in AArch64 modeO-ArmTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 stateP-mediumMedium priority
This is based on the discussion here; I don't understand much of the underlying technical details unfortunately.
It seems like setting -Crelocation-model=rwpi on an ARM target compiles code in a way that it expects a particular register to be reserved for data addressing. However, the standard library is not built with that in mind and can use the register for other purposes. That's clearly unsound, we can now get arbitrary misbehavior because the same register is used in conflicting ways.
The text was updated successfully, but these errors were encountered:
RalfJung
added
I-unsound
Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
O-AArch64
Armv8-A or later processors in AArch64 mode
O-Arm
Target: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 state
labels
Oct 5, 2024
rustbot
added
I-prioritize
Issue: Indicates that prioritization has been requested for this issue.
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
Oct 5, 2024
Also, AFAIK the RWPI issue still blocks TockOS from being able to execute applications written in Rust, because the run-time RW address isn’t known at compile time.
You can see it’s been known about for a very long time and no-one has fixed LLVM yet. Well I think Arm fixed their copy of LLVM but they only use it with clang and they only support C code.
I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessO-AArch64Armv8-A or later processors in AArch64 modeO-ArmTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 stateP-mediumMedium priority
This is based on the discussion here; I don't understand much of the underlying technical details unfortunately.
It seems like setting
-Crelocation-model=rwpi
on an ARM target compiles code in a way that it expects a particular register to be reserved for data addressing. However, the standard library is not built with that in mind and can use the register for other purposes. That's clearly unsound, we can now get arbitrary misbehavior because the same register is used in conflicting ways.The text was updated successfully, but these errors were encountered: