News for hackers. Stuff that matters.
Re:Wac: Minimal WebAssembly interpreter written in C by int_19h on Wednesday April 10, 2019 @04:22PM (#19628423)
Is it meant to be a sandbox? I don't see anything to that effect on the GitHub page.
Re:Wac: Minimal WebAssembly interpreter written in C by sitkack on Wednesday April 10, 2019 @05:41PM (#19629085)
When is Wasm not a sandbox?

Page one of the spec

– Safe: code is validated and executes in a memory-safe3, sandboxed environment preventing data cor-ruption or security breaches.

Re:Wac: Minimal WebAssembly interpreter written in C by kllrnohj on Wednesday April 10, 2019 @06:11PM (#19629271)
Doesn't mean the runtime needs to provide that sandbox. If the only thing in the process is the WASM runtime & the WASM code then you don't need the runtime to do any sandboxing - the kernel already did that for you.
Re:Wac: Minimal WebAssembly interpreter written in C by nickmooney on Wednesday April 10, 2019 @06:54PM (#19629521)
I'm not sure I agree. If you can affect the state of the runtime in ways that are not intended to be possible by the WASM API, this breaks sandboxing requirements. Even if you can't break out of the current process (due to isolation provided by the kernel), you can still cause arbitrary code execution within the process.
Re:Wac: Minimal WebAssembly interpreter written in C by kllrnohj on Wednesday April 10, 2019 @07:58PM (#19629845)
> you can still cause arbitrary code execution within the process

You start with the ability to do arbitrary code execution, you don't have to find an exploit to do that. And since your WASM code is the only thing in the process, what is an exploit going to let you do that you couldn't already do anyway?

Re:Wac: Minimal WebAssembly interpreter written in C by sitkack on Wednesday April 10, 2019 @09:11PM (#19630245)
I nominate this thread for the Worst of HN. Reminds me of work.
Re:Wac: Minimal WebAssembly interpreter written in C by kllrnohj on Thursday April 11, 2019 @04:29PM (#19638849)
You seem to be confused. Arbitrary code execution is just the ability to run code. It is a security attack when a user that wasn't supposed to be able to run code can now run code. But WASM and JS runtimes would be literally useless if you didn't start with the ability to run arbitrary code. Their sole purpose is to run code. You feed them code, they run it. You were supposed to have the ability to run code, therefore arbitrary code execution is not an exploit here.

Maybe you're confusing it with privilege escalation, though? Or a sandbox escape? But FYI those aren't the same thing. At all.

Alternatively if the worst you've seen on HN is one person seemingly confusing arbitrary code execution with privilege escalation you must not be on HN very much.

Re:Wac: Minimal WebAssembly interpreter written in C by sitkack on Thursday April 11, 2019 @05:45PM (#19639575)
Your rhetorical behavior is why I should leave HN. Trite, condescending, arrogant.
Re:Wac: Minimal WebAssembly interpreter written in C by int_19h on Wednesday April 10, 2019 @07:32PM (#19629711)
WASM is originally designed for the sandbox, but it doesn't mean that all its practical applications have to be sandboxed.
Re:Wac: Minimal WebAssembly interpreter written in C by sitkack on Wednesday April 10, 2019 @09:09PM (#19630236)
Wasm (not an acronym) assumes a sandbox, if an execution environment doesn't provide a sandbox it needs to clearly call that out.

This one clearly needs work in validating the Wasm sent to it.

Re:Wac: Minimal WebAssembly interpreter written in C by BenjiWiebe on Thursday April 11, 2019 @08:22PM (#19640705)
Isn't it a combination of the first letter of Web and the common abbreviation for assembly language, ASM?
Re:Wac: Minimal WebAssembly interpreter written in C by int_19h on Friday April 12, 2019 @05:31AM (#19643363)
They're correct - it's an abbreviation (of Web assembly), but it's not an acronym, so "Wasm" is the proper casing.