News for hackers. Stuff that matters.
Re:JavaScript performance, WebAssembly, and Shared Memory in... by pcwalton on Thursday April 20, 2017 @06:47PM (#14161582)
> Memory safe languages make it harder to create a specific types of vulnerabilities and can even keep them in check when they occur which is real a tangible benefit, but those same assumptions and errors will just produce different vulnerabilities.

No, because:

1. Not all such errors become vulnerabilities. An array index out of bounds exception triggered by a page causes an annoying crash in a memory safe language. In a non-memory-safe language, it is an out of bounds write that can be used to set up fun things like ROP chains.

2. Errors such as use after free simply don't exist in memory safe languages. There is no logic error that typically causes UAF: it's just straightforward failure to perform bookkeeping that a compiler and/or runtime does for you in most languages.

3. Not all vulnerabilities have the same severity. Memory safety problems tend to cause the worst of the worst: remote code execution.

Re:JavaScript performance, WebAssembly, and Shared Memory in... by Spivak on Thursday April 20, 2017 @07:08PM (#14161707)
> Errors such as use after free simply don't exist in memory safe languages.

Right, but we can play this game all day with different types of errors. Static typing makes improper method calling errors impossible and data hiding prevents someone from accidentally modifying internal state but we still use Python. Explicit returns makes accidental data leaking impossible but we still use Ruby. Explicit casting and comparing by value instead of identity would make all of JS's conditional errors disappear.

I completely agree with 1/3 but there are other solutions to this problem like W^X which gives similar benefits and doesn't require rewriting everything in a different language.

Re:JavaScript performance, WebAssembly, and Shared Memory in... by pcwalton on Thursday April 20, 2017 @07:46PM (#14161901)
> Static typing makes improper method calling errors impossible and data hiding prevents someone from accidentally modifying internal state but we still use Python. Explicit returns makes accidental data leaking impossible but we still use Ruby. Explicit casting and comparing by value instead of identity would make all of JS's conditional errors disappear.

No, we can't "play this game all day". Those errors don't result in arbitrary code execution with anything remotely approaching the frequency that UAF does.

> I completely agree with 1/3 but there are other solutions to this problem like W^X which gives similar benefits and doesn't require rewriting everything in a different language.

W^X comes nowhere near offering similar benefits. I even specifically mentioned ROP chains to defuse that notion…