Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Because people don't care abut security (or they just have no idea), hence they roll their own _FORTIFY_SOURCE hacks, but they still don't get memset_s right. So they rather named it what it is, protect from compiler optimizations, but not from cache side-channel attacks, which the _s variant would do. Because that is the secure variant.

memset_explicit is just to overcome stubborn optimizer people who insist to optimize functions away (without warnings!), even when they have no idea about side-effects.



> but not from cache side-channel attacks, which the _s variant would do

Wow, was that a requirement for memset_s? I'd never heard of timing being a something guaranteed by the *_s functions, regardless of security being in their name.


When the ISO standard Annex K was written, they didn't know of those security problems yet. No one knew. But it is documented to be the secure variant, so known vulns need to be fixed there. It can be slow, it just needs to be secure.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: