AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 36 Bitcoin

hashes: fix Miri UB in aarch64 loads

Public commit record

What the developer wrote

Authored by jrakibi

68/100 · Adequate
hashes: fix Miri UB in aarch64 loads

`vld1q_u32` loads four `u32` values, but `&INIT[0]`/`&INIT[4]`
creates a reference to only one `u32`.

Use `INIT.as_ptr()` instead
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a low-level memory-safety issue in the SHA-256 code that runs on ARM 64-bit processors (aarch64). The code was asking the CPU to load four 32-bit numbers starting from a pointer that only pointed to a single 32-bit number. Rust's strict memory rules (flagged by the Miri checker) consider this undefined behavior, even though real hardware often tolerates it. The fix uses a pointer to the whole array instead, so the load is clearly valid.

Recommended action

Apply the patch. It is a small, clearly correct fix that removes Miri-reported undefined behavior. No immediate incident response is warranted unless additional evidence emerges that the UB was exploitable in practice.

Security signals we found

01

Undefined behavior flagged by Miri in unsafe Rust code

02

Incorrect reference-to-pointer conversion for SIMD load width

03

Memory-safety fix in cryptographic hash implementation

Risk score

Why this scored 36/100

Our methodology →
Potential impact 8/30
Exploitability 4/25
Stealth signal 6/15
Affected reach 7/15
Confidence 7/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.