r/programming • • Dec 15 '24

Proof of concept showcasing how a WASM program can access files outside node:wasi's preopens dir

https://github.com/humodz/node-wasi-preopens-escape
31 Upvotes

56 comments sorted by

View all comments

Show parent comment

49

u/anxxa Dec 15 '24

Not sure what information you are trying to convey?

The uvwasi project is well aware that there are flaws in its filesystem implementation and explicitly say not to rely on it to run untrusted code. Your PoC README makes it seem like this is an independent conclusion that differs from the project authors, which it is not. I didn't realize that you quoted this same thing in one of the hidden comment chains though.

It's cool that you ran down the reasoning and provided a PoC, I was just providing further context for other readers of this this thread.

20

u/axonxorz Dec 15 '24

This dude is allll over this sub, being a belligerent asshole pimping Deno, check their post history. Never seen such an old account that couldn't maintain a positive comment karma, well done. You'd think NodeJS came into their house and murdered their child.

They display a frankly staggering amount of Dunning-Kruger.

14

u/Ok-Pace-8772 Dec 15 '24

This guy's every post and comment is a literal fever dream

-6

u/guest271314 Dec 15 '24

Your PoC README makes it seem like this is an independent conclusion that differs from the project authors, which it is not.

Not at all. I didn't write that code or README.md.

The Node.js/uvwasi documentation is absolutely vague. Nobody could possibly fathom what the disclaimer is referring to by the language in the disclaimer itself.

Somebody in the field took the time to try to divine what the Node.js folks were talking about.

20

u/anxxa Dec 15 '24

My mistake. Your somewhat defensive tone in this thread made me believe you were responsible for the PoC.

The Node.js/uvwasi documentation is absolutely vague. Nobody could possibly fathom what the disclaimer is referring to by the language in the disclaimer itself.

I think it's pretty clear: the file system APIs do not provide sufficient security guarantees if you want to use it for sandboxing untrusted WASM. Therefore do not use it if you wish to sandbox untrusted code.

Sure they could have a tracking issue linked for more details and specific examples of known gaps. You should open a PR if not having one frustrates you.

To reiterate my above comment: my point is that the PoC README concludes "Do not rely on node:wasi to run malicious code, as it can access files outside the preopens directory," which makes it look like uvwasi attempts to make security promises surrounding the filesystem APIs which is definitely not the case.

-21

u/guest271314 Dec 15 '24

My mistake. Your somewhat defensive tone in this thread made me believe you were responsible for the PoC.

Too funny.

"tone"?

Anytime anybody starts talking about "tone" on the Interwebs I know they are full of shit. Now, you could be an exception. I suspect not.

As if... you and your ilk are somebody to be defensive against on these boards, or pre-emptively strike against. You're just another individual human on the planet.

Defensive? No, not even close. Perhaps you folks are used to dealing with passive people. That I am not.

I will not be confused for docile

I'm free muthafuckas, I'm hostile

  • Kill Your Masters/A Report to the Shareholders, Run The Jewels

The Node.js folks could have actually described what the issue with their implementation is, with tests and examples. That's clarity.

The code works as expected when preopens is not used.

Going out on a limb here, since they know their code is broken, they could just remove the preopens option, the vague disclaimer, and then if they get around to it, merge some working code that implements preopens to WASI specification.

33

u/vlakreeh Dec 15 '24

As a passersby, your “tone” makes you come off as an asshole with an ego for posting something on Reddit. People provided context and you instantly got defensive, learn some social skills.

-18

u/guest271314 Dec 15 '24

As a passersby, your “tone” makes you come off as an asshole with an ego for posting something on Reddit. People provided context and you instantly got defensive, learn some social skills.

Let's parse this, just for sport.

There is no way you can divine a "tone" on the Interwebs.

You are on Reddit, in the slums of social media talking about "social skills"...

Spare me the ridiculous lecture about "social skills". I don't care about your society or what you consider to be "social skills". That's your internal issue.

I'm not here to make friends, pass out virtual hugs, or influence how you interpret words you read on a programming board.

The context is I had to keep asking to get an example of the nonsensical, completely vague Node.js disclaimer. Node.js documentation doesn't spell out what's broken, and what's not broken in their WASI implementation.

There is no context outside of that, because the WASI specification doesn't have such vague language; it's specific. Even in the context of applications of the underlying host system the WASI filesystem implementation must still be sandboxed.

So why include broken code in an internal module shipped in the node executable itself?

24

u/Yawaworth001 Dec 15 '24

Dude you need therapy

0

u/[deleted] Dec 15 '24

[deleted] — view deleted comment

14

u/Calazon2 Dec 16 '24

That is an insult to the many autistic people in the world who are not enormous jerks.

14

u/Hellball911 Dec 15 '24

"I know they're full of shit", "your ilk" yeah, that's a no from me. I hope you're working on solo projects because I'd never want someone professionally working with this horrible attitude crumbling from modest criticism.

-5

u/guest271314 Dec 15 '24

Well, I'll put it this way. I have not went "looking for a job" in about 10 years. My last two gigs that I decided to help people out with were by referral from clients. Not because I chummed it up with people, but precisely because I don't give deference to anybody.

Let's see, a couple projects ago I was involved in a project for an original Microsoft investor. The project is well over $1 million in scope.

Another ongoing project is between phases that is well over $5 million in scope.

You have nothing to say "no" to. I didn't ask for anything.

You're on some social media bullshit.

I don't give a fuck what you think of me socially.

Or professionally for that matter. I can easily demand at least $75 an hour doing detail landscaping by myself.

Attorneys that pay me to do research are not giving a dman about some mythical "tone". They hire me because I am going to do the primary source research necessary to get pertinent information to act on.