Better HN
topnewbestaskshowjobs
Log inSign up

staticassertion

13,486 karma · joined Jun 1, 2016 (10y ago) · 4,896 submissions

@insanitybit
Submissions

comment 5y ago · link · parent

Your host OS has to allow for unprivileged user namespaces, which can add significant attack surface. There is a sysctl for this:

`sudo sh -c "echo 1 > /proc/sys/kernel/unprivileged_userns_clone`

Basically user namespaces let you do the same thing as pid or network namespaces, but with users. This means you can have a "fake" root user. The Linux kernel, marvel of software that it is, is easily confused by this and basically hands you trivial privescs if you're this "fake" root user.

This problem is pretty much only getting worse because user namespaces are becoming more powerful whereas kernel security is staying the same (ie: not moving at all).

That's why it's gated in most distros by default.

comment 5y ago · link · parent

> Erlang is compiled to bytecode, and the yield points are between each instruction sort of.

This is basically what I'm saying... at some point nothing is preemptive ie: at the instruction level.

> that's a huge part of my point about the beam not really being preemptive.

OK but I think that's really semantics, it doesn't really matter though. You are right that BEAM can't yield within an instruction or during FFI. If you think that means it isn't preemptive, ok, but as I said I think at some point you end up with "nothing is preemptive" and then "why do we have the word preemptive" and then "because it's useful to describe systems like BEAM".

> Yes, that's my point. In erlang the conceptual arrow goes (resiliency => not-really-but-kinda-like-actors). In these other systems, or at least the ones I've peeked at, like pony and bastion the logic goes (actors => underpants gnomes => something like erlang). It's completely backwards.

Sure, actors aren't "the point". They just satisfy important properties that are necessary for resiliency. Pony takes a very very different approach from Erlang. Bastion seems closer.

I don't think "distance from Erlang" is really important or interesting though. Inspiration from Erlang is present in many of these systems, whether they re-implement the exact concepts or not.

comment 5y ago · link · parent

> Honestly erlang isn't really preemptive either, it just has a lot of hidden yield points.

At some level this is true of all systems - you can't yield in the middle of a `mov`, for example. But as Erlang is interpreted it doesn't rely on yield points. The caveat is that it does if you use CFFI.

> You can use ets tables to coordinate processes (but don't).

Yeah I'm sure there are endless ways to bypass the intended use of Erlang, I don't think it's really important. This is way different from Go where data is trivially shared across a channel.

> The raison d'etre of erlang processes is not really message passing concurrency, it's failure domain definition and failure domain bundling

Yes, this is true. The foundation of Erlang is based on earlier research that Armstrong cites in his thesis paper, such as the persistent process and transaction as the basis of system resiliency. But it's not a coincidence he landed on actors to express those things.

comment 5y ago · link · parent

Sure. I'm pretty familiar with Erlang's historic roots and motivations and I would agree that isolation is one of those fundamental components.

comment 5y ago · link · parent

Yep, for the 0.0001% of developers who target arcane architectures C is still pretty much it.

comment 5y ago · link · parent

The one that plans to print much shorter strings, but accepts arbitrary strings.

comment 5y ago · link · parent

Sure, lots of languages are like Erlang. Actors and CSP are pretty fundamental patterns.

Some things that would make it more like Erlang than Go (but that I won't bother to verify):

1. Go isn't really pre-emptive, it just has a lot of hidden yield points afaik

2. Go doesn't enforce message passing, Erlang obviously does

3. When you send a message to a goroutine that has panicked you hang and, potentially at some point, panic. In Erlang an actor dying can send out a final exit message that other actors (likely a supervisor) can subscribe to.

So yeah IDK. To me if it's got lightweight processes, pre-emption, and message passing, it's got everything that makes Erlang special. If it says it's inspired by Erlang I'm going to assume that, along with those things, it also shares goals like fault tolerance.

comment 5y ago · link · parent

An interesting capability of webassembly is that you can pass programs across VMs. So if you have service discovery, you basically can have RCE, which I imagine makes the "run anywhere" kinda easy to build yourself.

comment 5y ago · link · parent

Thanks for posting this on a Friday, this is basically gonna be my weekend now. I love the idea of meshing a lightweight process framework with webassembly.

comment 5y ago · link · parent

> Lunatic's design is all about super lightweight processes. Processes are fast to create, have a small memory footprint and a low scheduling overhead. They are designed for massive concurrency.

> All processes running on Lunatic are preemptively scheduled and executed by a work stealing async executor.

Sounds like Erlang to me.

comment 5y ago · link · parent

Yeah, as a CEO I find it gross. I don't make the most at my company by a long shot - I own stock, which carries more risk, but I chose to take this path. If the company is over budget I'm the first to take a pay cut, I would never try to extract that from my employees before I did so with my own funds.

The reason developers are paid a lot is because they're worth a lot. That's it.

IMO If you're a CEO that's what you sign up for. If you can't handle that, find another job.

comment 5y ago · link · parent

Thanks, I don't use nodejs much so I tried Google'ing around and got tons of garbage results.

comment 5y ago · link · parent

Is there somewhere that actually talks about LTS releases? I'm trying to find when it's EOL and I'm getting mixed information - one page said it was April 2021, you're saying it's still LTS?

comment 5y ago · link · parent

Wow this is actually the worst solution I could imagine.

comment 5y ago · link · parent

The people who answer Y without addressing X are far more annoying and detrimental than the people asking X.

If you see a likely XY problem, answer X, then explain why they might want Y, and then answer Y.

comment 5y ago · link · parent

> The purpose of NATting is to deal with limited IP addresses, a problem that has been solved for a long time now.

You mean by nat'ing?

comment 5y ago · link · parent

It depends. My expectation is that the TPM holds a key that's used for FDE, and if you have a password that password is used to get that key. So the password will only increase security if it's used to encrypt the TPM's key, but if it's just used to authenticate to the TPM, it wouldn't.

Someone more familiar with TPM 2.0 could likely answer this authoritatively, but my assumption is that it's the latter.

Properly leveraging TPM 2.0 features would likely be the best way to solve this problem.

comment 5y ago · link · parent

You could have made that argument a few years ago, before we started to see in-the-wild exploitation of these vulnerabilities.

comment 5y ago · link · parent

Kind of an indictment of the FSF that you think no one would bother talking to them.

comment 5y ago · link · parent

Yep, much of the wins look to be a matter of just recompiling, which is great. I'm a big fan of these pointer tagging techniques in general. I just want to be clear that pointing at CHERI and going "See? We already have memory safe C and C++" is glossing over some important details.

Best of luck with the research, I'm quite bullish on the work.

comment 5y ago · link · parent

Not really, no.

comment 5y ago · link · parent

This is already the case.

comment 5y ago · link · parent

You can't just adopt that hardware and get memory safety. The hardware is providing support for a capabilities model, which you then have to adopt at a software level both within your OS, compiler, and application code. This also would break C and C++ ABIs, so it's very unlikely to get adopted for a number of cases.

Further, CHERI is not enough to achieve temporal memory safety, it only provides the primitive that one could use to implement an efficient, correct tracing GC.

Perhaps most importantly, one can not use CHERI today. It is just not an option. Memory safe languages exist, and have existed for quite some time.

Pointer tagging and other approaches like CHERI are very promising. Keeping in mind of course that they double the size of pointers and have a global runtime performance cost. Less ambitious but otherwise similar mitigations are already being adopted.

comment 5y ago · link · parent

I hope it's clear that there's a major difference between a car being hit by an artillery shell (extremely rare) and a nation state attacker exploiting software (extremely common).

comment 5y ago · link · parent

The way this would likely end up being handled is the same as any other compliance.

You define the threat model for your application and then justify why you're safe. In this case we'd be adding an explicit point to ensure that there are controls for attackers who can exploit memory safety issues.

You could end up with controls like:

1. We sandbox our code, so even though it's C we feel that we're safe

2. We use a memory safe language to reduce the risk of memory safety issues

3. We sanitizer inputs before providing them to the program

etc etc

What ends up being accepted as legitimate would be up to the auditors/ generally a matter of consensus.

comment 5y ago · link · parent

To be clear, yes. The issue is with how Go's "interface{}"s (and some other types - like slices, etc) work - it's two pointers that can't be written to atomically, which means you can get into a situation where your objects are invalid.

https://blog.stalkr.net/2015/04/golang-data-races-to-break-m...

Here you can find a POC.

You could argue that this is contrived, but it's also not going to be fixed. This is in contrast to Rust, where there may be implementation flaws leading to unsafety in safe code, but the language retains the right to fix those, even if it breaks code.

Still, I think there's really no question that Go is a major step up over C and C++.

comment 5y ago · link · parent

I'm not a civic engineer, but I know some, and that doesn't ring true. I know, for example, that with regards to the NYC subway post-9/11 there was rigorous work to plan and implement safety measures against various terrorist threats. That included modeling the impact of various types of bombs in different parts of NYC's subway tunnels, etc.

This work was mandated for projects that were, in aggregate, likely billions of dollars.

comment 5y ago · link · parent

I think this is probably one of the better, more practical ideas that I've seen. If the government has to consider whether the underlying technology has adequately addressed memory safety issues (doesn't have to be at a language level, but that's obviously the easiest way), that puts pressure on them to fund projects that use memory safe approaches.

That's billions of dollars that will get slowly steered in the right direction.

1
828384
164