Better HN
topnewbestaskshowjobs
Log inSign up

staticassertion

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

@insanitybit
Submissions

comment 9y ago · link · parent

No CS degree here either.

Variables exist in memory, right? But we only need them for some amount of time - then we want our memory back. There are many strategies for this - Java uses a garbage collector to search through memory and reclaim parts no longer in use, C programmers manually call 'free'. Java suffers from its strategy because of the performance impact of that scan/ freeing strategy. C suffers from the complexity of manually managing memory leading to many security vulnerabilities.

Rust takes this concept of how long memory should live - when it should be freed - and encodes it into its type system. Similar to how you can say 'this thing is an int and it can be added to other ints' rust says 'this thing lives this long and it can reference other things that live this long, or shorter'.

Then the compiler can tell you "hey, you're trying to access something that might have been freed" the same way it would say "you're trying to add an integer to a string".

This means you don't have the performance impact of the GC but you also have a compiler watching your back, telling you when you may be doing something unsafe.

The algorithm used to determine how long variables live and when they can / can't be accessed is the subject of the RFC.

comment 9y ago · link · parent

Right, but I think when they say "core libraries" they probably mean things like hyper, which are still unstable (though getting closer to stability). That said, a lot of big rust crates have stabilized in the last few months.

comment 9y ago · link · parent

Check out P?

comment 9y ago · link · parent

This is all fine for a personal project. The amount that the time you spent optimizing would cost a company is very likely to outweight the cost of scaling hardware.

comment 9y ago · link · parent

OK, what happens when your power goes out? What happens when a system goes down? Are you including the cost of your infra/ ops team in your server costs?

What about the larger upfront investment for hardware, especially over provisioned, relative to a spread out payment? What about the 5000 credits you get upfront from aws for startups, and the free tier?

As for vendor lock in, this isn't a problem most companies face - they're fine buying into AWS, and you're underselling the many, many other services they provide beyond EC2.

comment 9y ago · link · parent

What power, specifically, are you missing in extensions?

comment 9y ago · link · parent

Seems like something that should be mentioned in the README. Users of this library, by default, are vulnerable.

I'm not sold on the 'race a goroutine' solution either, but I'm not much of a Go programmer.

comment 9y ago · link · parent

Nothing seems to state that it isn't vulnerable to timing attacks. Everything seems to be. That's unsurprising, since it's all pure go.

comment 9y ago · link · parent

Did a quick ctrl + F in the readme to look for how they handle timing attacks in Go. As this is a pure Go implementation, I'm curious - how are these attacks mitigated, or is that left to consumers of the library?

comment 9y ago · link · parent

What if they actually were inspired by one of them? Why not give some background and context to a crowd that may not be familiar with various icons?

comment 9y ago · link · parent

This is silly. Your argument is still "It's a bottle therefor stop making a big deal about it" - it's someone's job to care about it. They explain the problem they set out to solve, how they solved it, a background to how these problems are solved (I don't know shit about design, so the "less but better" reference is actually interesting).

If you want to say "It's marketing" no shit, anything any company publishes ends up going through marketing at some point. Every tech blog a company has is marketing. Who cares?

comment 9y ago · link · parent

Ever since that paper was linked to on Ars everyone thinks ASLR is done for. ASLR was always vulnerable to cache timing attacks. ASLR can not protect you in the case that you can arbitrarily compute on the target machine - this is not new, this has never been the goal of ASLR. That paper was not the first to demonstrate this.

If you can not arbitrarily compute on the target machine ASLR is still completely useful. This is the case for tons of vulnerabilities, like basically anything that isn't a web browser with JS execution privileges.

comment 9y ago · link · parent

DEP isn't relevant. If you're compiling your own kernel this is a completely viable security technique.

Where it fails is in distros. AFAIK most linux distros do something similar (based on Grsecurity patches) but it's useless because... they then distribute the binary, with everything necessary to get addresses.

But if you're distributing it internally/ it's a secret, yeah, you're going to benefit from that.

comment 9y ago · link · parent

I agree. This comes up a lot when discussion C/C++ - is it the compiler's fault, the developers, etc? The reality is it's irrelevant. Rust-the-language is safe but no one uses rust-the-language they use rustc. The end result is that it is possible to have memory unsafe rust code without unsafe blocks.

Rust developers should be aware of this - they're almost always incredibly trivial patterns to avoid, but only if you know about them.

comment 9y ago · link · parent

Yes, and I really want to read the actual pdf :(

comment 9y ago · link · parent

Transactions.

comment 9y ago · link · parent

Yes, exactly. Thanks very much. Do you know if Facebook/ Youtube are still in PHP / Python?

comment 9y ago · link · parent

Can you source some of these? Genuinely curious.

comment 9y ago · link · parent

I don't really know a thing about that sort of network, but if you can assume a reliable network, the machine reading the packets going down shouldn't matter. The sender won't get an "ACK", will know the other machine is at fault and not the network, and can resend.

Given a "perfect network" I think exactly-once-delivery is possible, right?

comment 9y ago · link · parent

Take a lesson - always write parsers in C and then execute them as root, and be sure to send as much malicious content to them as possible. Bonus points for hooking it up to the internet.

comment 9y ago · link · parent

Good points! I also appreciated your writeup on this class of attacks.

comment 9y ago · link · parent

> Generally speaking if a attacker has an account on your system you are already hosed.

Keep in mind that software is moving towards a sandboxed world, especially with containers. Local attack surface is becoming increasingly valuable.

comment 9y ago · link · parent

Take note of the Grsecurity section. We already have the technology necessary to mitigate or significantly reduce the impact of these vulnerabilities.

Solid writeup.

comment 9y ago · link · parent

Totally. There are multiple known soundness issues with rust already. Still, the language is definitely miles ahead when it comes to safety (within its niche).

comment 9y ago · link · parent

Rust has no top level concurrency model. The standard library provides an abstraction over OS threads, and that's about as much as there is. The ownership model is sort of concurrency-model-agnostic.

Currently the popular Rust concurrency model is Futures. It won't be the only concurrency model used.

comment 9y ago · link · parent

I think what's interesting about this is that the one on the right looks ridiculous and complicated. At some point a human being has to know how to use it, and rather than a trivial interface, it's a complex one.

Many would likely still reach for the far left. A human would have to make a call saying "Wow, this is not a compromise we can make, other humans are not going to use this".

That said, it's a moot point - I am in full agreement that the two revolutions are different.

comment 9y ago · link · parent

> On the gripping hand, it's also yet another bit to differentiate me from everyone else, and expecting polite and ethical behavior from advertising corporations probably really is doomed to failure.

Yeah, I considered bringing this up in my original post - DNT is garbage for a lot of reasons. One of the big ones being that it actually sucks for privacy, especially if it's not used a ton. It's one more thing that can make you trackable.

1
156157158
164