Better HN
topnewbestaskshowjobs
Log inSign up

staticassertion

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

@insanitybit
Submissions

comment 4y ago · link · parent

Thanks

comment 4y ago · link · parent

I don't think this is a great example of "sound C program turning into unsound Rust program". The crate isn't "unsound" in the way a C program would be - it's unsound in the sense that, given either 'unsafe' elsewhere or changes to how Rust constructs work (that are not guaranteed) a consumer of this crate could accidentally violate one of the necessary guarantees.

For a Rust program the bar is "has to be safe, even if some other part of the program uses unsafe". That seems like it's arguably a higher bar than C where everything is already "unsafe" in that same way.

comment 4y ago · link · parent

Of course, I'm sure many people have had similar experiences to both of us. I'm only saying that there's a lot of grey area here.

comment 4y ago · link · parent

You say "duh" but this is pretty controversial and there's a big push for remote work right now. I'm "pro remote" - my company is full remote, for example. I also think I'd have a much worse career if my first job hadn't been in an office, especially such a cool office with great coworkers to chat with. Being in an office was incredibly motivating and exciting as a junior developer.

Being in an office also made it clear how much I worked. I was there on most weekends and people noticed.

I'm not saying that that's more important than the benefits of remote, but people absolutely do act like it's a black and white scenario.

comment 4y ago · link · parent

On github* ?

comment 4y ago · link · parent

The linux kernel is absolutely anything other than high quality lol

comment 4y ago · link · parent

Unsurprisingly the types of bugs reported are going to be around business logic errors and not obscure edge case that users won't run into naturally. The bugs are still there though.

comment 4y ago · link · parent

It's crazy how much fuzzing has changed in a decade. The fact that you can just write some code in your native language and get top quality fuzzing is incredible. You used to have to put 'pits' together and run peach or honestly just roll your own, no way you'd have access to the instrumentation at the level we do now.

The 'rust fuzzing' experience is really solid. You just 'derive' your way through it and you're 99% done.

> It’s quite natural and more efficient to start this process with something like Vec::with_capacity(list_length). Usually this is fine, but if the minidump is corrupt (or malicious), then this length could be impossibly large and cause us to immediately OOM.

That's a fun one. I `with_capacity` all the time and I guess I hadn't really thought too much about whether the value I pass in is strictly valid every time. Food for though.

Anyway, awesome write up, and great nod to Mario universes, which itself is a wild ride.

comment 4y ago · link · parent

> Besides, the known collision attack generates files with blocks of binary garbage, which makes it difficult to trick someone into accepting. It won't look like source code, and if someone accepts binary blobs of executable code, you don't need collisions to pwn them.

IDK, I could see this happening in multiple ways.

1. Images / media artifacts stored for display purposes

2. Cached files - 'zero install' config for yarn comes to mind, where every dependency has its file cached in git.

Plus binary files aren't displayed in git diffs so it seems somewhat easy to sneak in.

Otherwise, yeah, agree. Most people don't rely on Git's security model, they rely on Github's.

comment 4y ago · link · parent

100% of exploited vulnerabilities leveraged memory unsafety. 70% of vulnerabilities discovered are from memory unsafety.

comment 4y ago · link · parent

With vanilla Docker ipv6 is just disabled by default I believe.

comment 4y ago · link · parent

> Personally I would trust the Linux kernel developers to find and fix security issues

Yeah I highly recommend not having that view. Kernel upstream is the entire reason this problem exists - they spent decades downplaying and deriding security researchers who found root -> kernel privesc, and, in general, have had an incredibly hostile relationship with security professionals.

I don't know the case with Docker as much but my impression is a lot more positive based on what I've seen - integration with Apparmor/SELinux, seccomp, memory safety, etc.

comment 4y ago · link · parent

I'd rather run Docker as root than enable unprivileged user namespaces, security-wise.

comment 4y ago · link · parent

Yes, that's a really good point. The vulnerabilities are across a number of components (skia, for example, is another big one) but memory safety in VMs is particularly tricky. Still, my personal, somewhat unfounded belief is that Rust has a lot of potential there.

comment 4y ago · link · parent

TBH it's only easy if you're ignorant. It's quite obvious to anyone who's informed or educated at all that using Rust would address major security issues. It sucks that people require so much convincing.

comment 4y ago · link · parent

I also happily pay for Jetbrains.

comment 4y ago · link · parent

Most developers understand virtually nothing about security.

comment 4y ago · link · parent

The question was if the exploits were due to memory safety. The answer is, yes, 100% of them are due to memory safety.

As for Java, quite a lot of the exploits against it (when it was a browser plugin) were in fact memory safety issues in the VM. But more recently what we see are serialization issues, which Rust also does not have.

comment 4y ago · link · parent

Just to clarify, exploit generally refers to software that takes advantage of vulnerabilities, vulnerabilities are the flaws themselves. As in, one writes code to "exploit" a "vulnerability".

70% of all vulnerabilities reported to them are memory safety issues. To my knowledge, 100% of exploits against Chrome in the wild leverage memory unsafety.

comment 4y ago · link · parent

Yes, I believe literally every single 'in the wild' exploit has abused memory unsafety, as well as hundreds of vulnerabilities every year.

comment 4y ago · link · parent

"Just get some more sleep" doesn't help people who already have Alzheimers, who are at risk, who have sleeping disorders, etc.

comment 4y ago · link · parent

I hope this works out. A memory safe browser would be a huge win for security.

comment 4y ago · link · parent

To me it's easily worth twice that, so I'm happy to pay 100/year.

comment 4y ago · link · parent

You can go way, way longer than 6 months without calories, depending on your fast stores. Yes, if you fast you should still ensure you're taking vitamins.

comment 4y ago · link · parent

Tackling the "core problem" of "all life has evolved to build a surplus of energy given a surplus of resources over the course of the lifetime of our universe" feels way harder to solve through willpower than addressing the biology directly.

comment 4y ago · link · parent

That seems particularly important. Leptin is naturally released by fat cells, so I wonder how this would have impacted overweight mice, who may have already been naturally releasing this leptin - assuming that's how leptin works.

But also, no one should be fasting and eating nothing - they should make sure they're getting the necessary vitamins and minerals. Taking more leptin could make sense.

comment 4y ago · link · parent

I think the myth's origin is that if you start fasting/ really cut calories you'll notice a huge, immediate drop for a day or two - a lot of that being that you're losing water weight. Like going from a night of eating/ drinking, and then fasting the next day, I can see a 5 pound difference.

Then that stops, and suddenly your scale isn't showing you the same drastic win as the first few days. You might reasonably think "I guess my body has adjusted".

That isn't to say that your body doesn't change how it functions in order to save energy, obviously a lot changes when you've exhausted your glycogen stores. But I think a lot of the "drastic" results for people hitting a wall after a few days of fasting is based on that initial huge win.

comment 4y ago · link · parent

Does k8s not just use dns? That's what Hashicorp Nomad uses - DNS via Consul.

comment 4y ago · link · parent

"Fast enough" is inherently unqualified since what "enough" is is going to be case specific.
1
404142
164