Re: [PATCH] wireguard: use memzero_explicit() when zeroing handshake key material
"Jason A. Donenfeld" <[email protected]> Mon, 23 Mar 2026 19:31:28 +0100
| Newsgroups | com.zx2c4.lists.wireguard |
|---|---|
| Message-ID | <CAHmME9payKWRXpwF40AXQuQ2v4YCNp6+Dwt_fqzmCMvnL0v9tA@mail.gmail.com> |
On Mon, Mar 23, 2026 at 6:42=E2=80=AFPM Jeroen Robben <[email protected]> wr= ote: > > Replace memset() calls in handshake_zero() with memzero_explicit() > to ensure clearing handshake state is not optimized away by the compiler. Why would the compiler do this? These aren't some stack variables that are never touched again subsequently. It's zeroing out some members of a pointer that lives elsewhere.