Wac: Minimal WebAssembly interpreter written in C
github.com
github.com
What prevents me from writing a wasm file with an arbitrary value for "depth" greater than CALLSTACK_SIZE (1024) and overflowing the buffer? (If the answer is "nothing", that's probably arbitrary code execution.)
But then actually use the myriad of compiler flags, static analysers and dependent typing tooling (Frama-C) available for it.
Some of them exist since 1979.
If someone can scan your repo for a problem this quickly, then youre not designing secure software, and that should be posted front and center at the top of the repo given that wasms entire purpose is machine independent code that is properly sandboxed from exploitation.
Page one of the spec
– Safe: code is validated and executes in a memory-safe3, sandboxed environment preventing data cor-ruption or security breaches.
This one clearly needs work in validating the Wasm sent to it.
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?
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.
my thoughts go directly to fast over the air updates without a full flash, fixing bugs or reconfiguring on the fly.
IoT probably should be shipping code that uses static compiler checks as the first line of security defense rather than run-time checks like valgrind and asan.
"Like" following the rest of the sentence can be understood as "for example", and not as the only possibilities to choose from.
My personal experience is tools like valgrind will immediately shove stupid mistakes back in your face (rather than waiting a few days to realize the change you made is corrupting the heap in a way that eventually causes the program to crash.) and the result is not only better memory management in your project but also better memory management in future projects.
The PICO8 is very pretty but it's not at all like small 8/16 bit computers.
It's strange that the readme says it requires 32 bit userspace tools.
Part of me is pretty excited to have an open "write once run everywhere" environment but the other part of me really likes that autoconf/cmake more or less provide that now and I'm worried that things like this will discourage people from making their projects easily buildable by the end user.
Docker already does that, try building freeciv-web yourself without tools like docker, the end result is that it can be very difficult to modify it when you need to.
I heard there are several compilers that work with c++ but i don't see many.