Skip to content

normalize, ore: close the plaintext copies the zeroize re-audit of #489 found #577

Closed

Description

@coderdan

The zeroize re-audit of #489 found plaintext copies in vitaminc-normalize and vitaminc-ore that are freed or left on the stack without being wiped.

Finding Where The copy
ZA-0102 normalize test helper holds zip_ref hands the closure a plain Vec of the expected bytes, which is freed unwiped.
ZA-0103 normalize test helper decimal::tests::encode risky_unwrap takes the encoding's Vec out of its Protected, so it is freed unwiped.
ZA-0104 normalize integer Int::sign_and_word isn't inlined across the crate boundary, and returns the sign and word through a 32-byte stack slot that nothing wipes.
ZA-0105 normalize timestamp timestamp_nanos returns the nanosecond count through a 32-byte stack slot in the same way.
ZA-0106 ore order() / int() convert builds an Int at the target width, and int takes it by pointer, so the value sits in a 32-byte stack slot.

The test helpers matter because tests are where people copy patterns from. They should show the safe way to compare.

ZA-0101 (the Controlled combinators hand the closure the bare inner value) is in vitaminc-protected, and is out of scope here.

Activity

  1. self-assigned this
    on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions