Optimising compilers (like gcc/clang with -O1 or above) were optimising out the memset(). Until link time optimisations are good enough, this will prevent them from doing so. The best solution would be to use memset_s() (c11), though it's not readily available yet. This is the first step towards using memset_s() with a fallback for systems who don't have it. A better solution, is to put it in Eina, to prevent LTO completely. This will have to be done after the EFL release. Even this is not entirely safe though, but at least it protects us from some memory disclosure issues. This doesn't solve the fact that we may store a copy of the password in other places, like the input system. We need to address that too. Thanks to Matthew Garrett for pointing this out or Twitter.devs/stefan/wl-session-recovery
parent
9eaac75ae2
commit
acfdda6c7f
4 changed files with 25 additions and 11 deletions
Loading…
Reference in new issue