Readit News logoReadit News
insanitybit commented on Maestro: A Linux-compatible kernel in Rust   blog.lenot.re/a/introduct... · Posted by u/Uriopass
t8sr · 2 years ago
> I don't know what your point is here. Do you spend a lot of time in your career thinking about hardening your containers against kernel CVEs?

Yes, I literally led a team of people at a FAANG doing this.

You're saying the easiest way to escape a container is a vulnerability normally priced over 1 million USD. I'm saying the easiest way is through one of the million side channels.

insanitybit · 2 years ago
OK, I apologize if I was coming off as glib or condescending. I will take your input into consideration.

I'm not looking to argue, I was just annoyed that I was getting so many of the same comments. It's too early for all of this negativity.

If you want to discuss this via an avenue that is not HN I would be open to it, I'm not looking to make enemies here, I'd rather have an earnest conversation with a colleague rather than jumping down their throats because they caught me in the middle of an annoying conversation.

insanitybit commented on Maestro: A Linux-compatible kernel in Rust   blog.lenot.re/a/introduct... · Posted by u/Uriopass
jvanderbot · 2 years ago
This is getting a bit defensive. I think people are interpreting your post as saying all safety is guaranteed by using memory safety, but you rightly walk it back in comments to mean it addresses "primary" security problems.

That's it.

insanitybit · 2 years ago
It's just silly. I wrote an "imagine if we could trust the kernel as a boundary" and I get 100 posts about the same misconceptions. If people read into my post that I think a Rust kernel would solve all problems, perhaps I was overly simplistic with my language.

Deleted Comment

insanitybit commented on Maestro: A Linux-compatible kernel in Rust   blog.lenot.re/a/introduct... · Posted by u/Uriopass
maayank · 2 years ago
I’m interested of reading more. Where can I find the blog posts?
insanitybit · 2 years ago
https://web.archive.org/web/20221130205026/graplsecurity.com...

The company no longer exists so you can find at least some of them mirrored here:

https://chompie.rip/Blog+Posts/

The Firecracker, io_uring, and ebpf exploitation posts.

Chompie was my employee and was the one who did the exploitation, though I'd like to think I was at least a helpful rubber duck, and I did also decide on which kernel features we would be exploiting, if I may pat myself on the back ever so gently.

insanitybit commented on Maestro: A Linux-compatible kernel in Rust   blog.lenot.re/a/introduct... · Posted by u/Uriopass
jvanderbot · 2 years ago
I said "the idea of using memory safe languages is great!" And "using memory safe languages does not eliminate attack surface". (It's pre coffee here so I appreciate your probe)

I meant that it's over-reach to say it's completely trustworthy just bc it's written in a GC/borrow checked language.

insanitybit · 2 years ago
The premise of my post was "imagine a memory safe kernel". I repeatedly use the word "imagine".
insanitybit commented on Maestro: A Linux-compatible kernel in Rust   blog.lenot.re/a/introduct... · Posted by u/Uriopass
jmakov · 2 years ago
Hasn't Kata containers solved this probl: https://github.com/kata-containers/kata-containers ?
insanitybit · 2 years ago
Kata is an attempt at solving this problem. There are problems:

1. If using firecracker then you can't do nested virtualization

2. You still have the "os in an os" problem, which can make it operationally more complex

But Kata is a great project.

insanitybit commented on Maestro: A Linux-compatible kernel in Rust   blog.lenot.re/a/introduct... · Posted by u/Uriopass
opportune · 2 years ago
Respectfully, do you know what a container actually is? (I’m guessing you think it’s docker, which is a common misconception)

The kernel itself does very little to prevent containers from interacting with the host (yes, via syscalls) in a way that affects other containers or the host itself. Containers are not insecure/composed with VMs to protect against memory safety issues so much as to implement sandboxing preventing these syscalls from doing bad shit.

insanitybit · 2 years ago
> Respectfully, do you know what a container actually is?

I am extremely familiar with containers, the linux kernel, and virtual machines. In particular from a security perspective.

> The kernel itself does very little to prevent containers from interacting with the host (yes, via syscalls) in a way that affects other containers or the host itself.

Namespaces, such as process namespaces, file namespaces, user namespaces, etc, will prevent a container from interacting with another container without even getting into the fact that you can leverage DAC to do so further.

insanitybit commented on Maestro: A Linux-compatible kernel in Rust   blog.lenot.re/a/introduct... · Posted by u/Uriopass
t8sr · 2 years ago
Container vulnerabilities are rarely related to memory bugs. Most vulnerabilities in container deployments are due to logical bugs, misconfiguration, etc. C-level memory stuff is absolutely NOT the reason why virtualization is safer, and not something Rust would greatly improve. On the opposite end of the spectrum, you have hardware vulnerabilities that Rust also wouldn't help you with.

Rust is a good language and I like using it, but there's a lot of magical thinking around the word "safe". Rust's definition of what "safe" means is fairly narrow, and while the things it fixes are big wins, the majority of CVEs I've seen in my career are not things that Rust would have prevented.

insanitybit · 2 years ago
> Container vulnerabilities are rarely related to memory bugs.

The easiest way to escape a container is through exploitation of the Linux kernel via a memory safety issue.

> C-level memory stuff is absolutely NOT the reason why virtualization is safer

Yes it is. The point of a VM is that you can remove the kernel as a trust boundary because the kernel is not capable of enforcing that boundary because of memory safety issues.

> but there's a lot of magical thinking around the word "safe"

There's no magical thinking on my part. I'm quite familiar with exploitation of the Linux kernel, container security, and VM security.

> the majority of CVEs I've seen in my career are not things that Rust would have prevented.

I don't know what your point is here. Do you spend a lot of time in your career thinking about hardening your containers against kernel CVEs?

Dead Comment

insanitybit commented on Maestro: A Linux-compatible kernel in Rust   blog.lenot.re/a/introduct... · Posted by u/Uriopass
K0nserv · 2 years ago
I largely agree, but this seems quite unfair to Linux.

> But damn, if Linux had been built with safety in mind security would be a lot simpler. Being able to trust the kernel would be so nice.

For its time, it was built with safety in mind, we can't hold it to a standard that wasn't prevalent until ~20 years later

insanitybit · 2 years ago
I don't think it's that unfair, but I don't want to get into a whole thing about it, people get really upset about criticisms of the Linux kernel in my experience and I'm not looking to start my morning off with that conversation.

We can agree that C was definitely the language to be doing these things in and I don't blame Linus for choosing it.

My point wasn't to shit on Linux for its decisions, it was to think about a hypothetical world where safety built in from the start.

u/insanitybit

KarmaCake day4243September 16, 2022
About
Mastodon: https://infosec.exchange/@insanitybit Github: https://github.com/insanitybit

Rapid7 -> Dropbox -> Grapl -> Datadog

View Original