Skip to content
NewA calmer, faster ZeroHour

Zeroization, part 1: Wiping can make things worse

Lobsters · securityby 00f.net via olliej ()7 min read2 · 1 read
AI summary · grok-4.7Summaries by Vani AI

Common secret-wiping patterns can add stack copies or erase memory that never held the secret.

A compiler-focused write-up argues that blindly adding secret-wiping calls can leave more copies than the original code. memset of a dead intermediate is optimized away, and the value may never have been stored in memory. Volatile byte stores can zero stack slots that never received the secret while it stays in a register, and an opaque wipe in another file can force a spill so the callee might read it. In a compare-and-wipe example built with Clang without LTO, an extra computed-tag copy remained, and the comparison ran after the wipe call.

Key facts
  • Compilers can delete memset of a value that is never read again.
  • Volatile zero stores may miss a secret that remains in a register.
  • An opaque wipe can force a new stack copy of the secret.
  • That stack copy can be cleared while the register copy survives.
  • Clang kept an extra tag copy and compared it after the wipe.
Analyze this story with Vani AIImpact, who is affected and what defenders should do, in a new chat

From the original article

7 min read at 00f.net

A good hygiene when processing secrets is to wipe them after use. And projects receives countless PRs about adding calls to zeroization functions for anything that looks like a secret. This is a low-hanging fruit, something LLMs love to report, and it feels theoretically useful.

Lobsters · security

By 00f.net via olliej · 00f.net

Read the full article at Lobsters · security

A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.