News for hackers. Stuff that matters.
Re:Security flaws caused by compiler optimizations by bigtrakzapzap on Wednesday August 21, 2019 @03:19PM (#20760606)
Basically, every kernel needs an explicit_bzero() system call because it's very difficult to assure data flow properties of de/initialization without something the compiler cannot optimize away.
Re:Security flaws caused by compiler optimizations by rogueresearch on Wednesday August 21, 2019 @04:13PM (#20761182)
memset_s() was added to C11 for this.
Re:Security flaws caused by compiler optimizations by jmgao on Wednesday August 21, 2019 @11:10PM (#20764308)
memset_s was added to C11 in an optional annex, and my understanding is that there are zero platforms that actually implement it. (Microsoft implemented an early draft of Annex K that doesn't actually include memset_s.)
Re:Security flaws caused by compiler optimizations by rurban on Thursday August 22, 2019 @12:54AM (#20764757)
Most libc's added an insecure version of memset_s, doing only the above discussed compiler-barrier, but not a memory-barrier, which is needed for Spectre, broken HW. The default memset should do the compiler-barrier. But unfortunately you cannot talk with libc maintainers about security. Too much arrogance. Thanks to this Redhat article for supporting the user-base on this.

You can use my safeclib, which implements the Annex K extensions.

Re:Security flaws caused by compiler optimizations by valleyer on Thursday August 22, 2019 @12:20AM (#20764601)
It's present on Mac OS X.