Re:Don't setenv in multi-threaded code on glibc
by pjmlp on Tuesday January 31, 2017 @01:04PM
(#13533314)
Which is the reason that even if we would write an UNIX OS in something like Ada or Rust instead of C, we wouldn't get away from security exploits caused by the UNIX API.
Hence why in parallel with better systems languages, we really need tagged architectures for pointers, like what SPARC V8, Intel MPX, Cherry offer, to become widespread, for better security.
Re:Don't setenv in multi-threaded code on glibc
by quotemstr on Tuesday January 31, 2017 @01:11PM
(#13533392)
Upthread, I pointed out a sane and safe alternative to POSIX getenv interface, one that works fine with regular C, and here, you're claiming that we need exotic features to achieve safety? What?
The problem is the interface is naturally unsafe. Much like e.g. strcpy, the interface means it's nigh impossible to use it safely.