News for hackers. Stuff that matters.
Re:V8 release v6.9 by deweller on Tuesday August 07, 2018 @01:15PM (#17708504)
I'm sure there will be exploits, as the attack surface will become bigger.

But isn't wasm designed from the ground up to be sandboxed in a certain memory space? And won't that prevent buffer overruns from gaining access to other parts of the browser?

Re:V8 release v6.9 by pjmlp on Tuesday August 07, 2018 @01:24PM (#17708594)
Yes it is sanboxed, but the memory inside of a WebAssembly module can still be corrupted, specially if it was compiled from any language without bounds checking enabled.
Re:V8 release v6.9 by magicalist on Tuesday August 07, 2018 @02:03PM (#17708957)
> the memory inside of a WebAssembly module can still be corrupted, specially if it was compiled from any language without bounds checking enabled.

it can be, but there are large classes of security issues that aren't possible like they usually are with those languages. eg it's not possible to jump to arbitrary locations, you can't write to executable memory, etc.

https://webassembly.org/docs/security/

Re:V8 release v6.9 by pjmlp on Tuesday August 07, 2018 @02:12PM (#17709053)
Still not having bounds protection is a very big one, and 40 years of CVE history doesn't help.
Re:V8 release v6.9 by vardump on Tuesday August 07, 2018 @02:18PM (#17709116)
WebAssembly does have bounds checking, you can't write outside the designated memory block.

On 64-bit systems with virtual address space to spare, you can offload bounds checking to MMU by memory mapping 2 GB+ protection zone both below and above the exposed memory region.

If you then limit all pointers/offsets to 32-bit, there should be no direct way to corrupt anything else. You can't reach anything interesting within 32-bit offsets. Of course one can corrupt WebAssembly instance memory all they want, but it won't matter.

Performance and security win.

Left CPU bugs outside consideration, hopefully those can be addressed in WASM codegen. Not like it's that different from current Javascript JIT cases.

Re:V8 release v6.9 by pjmlp on Tuesday August 07, 2018 @02:30PM (#17709247)
The memory block contains all data together in well, a block, thus you can happily overwrite two neighbouring arrays, unless I am missing something here WebAssembly does not have fat pointers.
Re:V8 release v6.9 by vardump on Tuesday August 07, 2018 @02:33PM (#17709271)
Sure, you can corrupt all the data in your instance.

You can't overwrite code or the true call stack, so what's the (security) risk?

Re:V8 release v6.9 by pjmlp on Tuesday August 07, 2018 @02:45PM (#17709386)
Funny question, basically with corrupted data anything goes.

For a very extreme convoluted example, maybe that value given back to the JavaScript layer will trigger a patient death by sending the wrong value to their insulin device monitor.

But yeah, code and true call stack will be perfectly safe.

Re:V8 release v6.9 by vardump on Tuesday August 07, 2018 @03:19PM (#17709690)
One day a random bit flip in a web app on a non ECC-protected iPad * controlling a life-critical system will kill a person.

It's just a matter of time.

* Or any other device with data corrupting hardware or software issues.

Re:V8 release v6.9 by pjmlp on Tuesday August 07, 2018 @04:39PM (#17710555)
Yep it is just a matter of time.

Successful lawsuits against insecure software need to become a common event until most companies actually start paying attention to their technology stack and development processes.

Re:V8 release v6.9 by ubercow13 on Tuesday August 07, 2018 @04:38PM (#17710534)
Is that a security risk? That could just happen due to a logic bug.
Re:V8 release v6.9 by pjmlp on Tuesday August 07, 2018 @04:46PM (#17710632)
That is the common excuse of C developers.

The goal of software security is to minimize all attack vectors.

Logic bugs < Logic bugs + Memory corruption bugs

Re:V8 release v6.9 by ubercow13 on Wednesday August 08, 2018 @05:01AM (#17714191)
Sure but Im not sure how your example is a security bug and not a normal bug? I guess if the web page was also processing untrusted data?