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

It's worth noting that:

a) The vulnerabilities being introduced to the kernel for previous research were not done from university accounts (so banning the university would not have helped)

b) The static analysis research was completely unrelated, it had nothing to do with the work to insert vulns into the kernel.

comment 5y ago · link · parent

Yeah, I guess I shouldn't say S3 is the cheapest option there, I was thinking 'In AWS' but Backblaze is cheaper.

comment 5y ago · link · parent

> Update: Should have mentioned earlier, data needs to be accessible at all time. It’s user generated data that is downloaded in the background to a mobile phone, so super low latency is not important, but less than 1000ms required.

> The data is all images and videos, and no queries need to be performed on the data.

OK, so this definitely helps a bit.

At 10PB my assumption is that storage costs are the major thing to optimize for. Compression is an obvious must, but as it's image and video you're going to have some trouble there.

Aggregation where you can is probably a good idea - like if a user has a photo album, it might make sense to store all of those photos together, compressed, and then store an index of photo ID to album. Deduplication is another thing to consider architecting for - if the user has the same photo, across N albums, you should ensure it's only stored the one time. Depending on what you expect to be more or less common this will change your approach a lot.

Of course, you want to avoid mutating objects in S3 too - so an external index to track all of this will be important. You don't want to have to pull from S3 just to determine that your data was never there. You can also store object metadata and query that first.

AFAIK S3 is the cheapest way to store a huge amount of data other than running your own custom hardware. I don't think you're at that scale yet.

Latency is probably an easy one. Just don't use Glacier, basically, or use it sparingly for data that is extremely rare to access ie: if you back up disabled user accounts in case they come back or something like that.

I think this'll be less of a "do we use S3 or XYZ" and more of a "how do we organize our data so that we can compress as much of it together, deduplicate as much of it as possible, and access the least bytes necessary".

comment 5y ago · link · parent

5 years at Google is forever, and it's not uncommon at all for people to jump around projects at the company. It's also a full year beyond what's necessary to vest. Really silly way to write that.

comment 5y ago · link · parent

It's going to depend entirely on a number of factors.

How are you storing this data? Is it tons of small objects, or a smaller number of massive objects?

If you can aggregate the small objects into larger ones, can you compress them? Is this 10PB compressed or not? If this is video or photo data, compression won't buy you nearly as much. If you have to access small bits of data, and this data isn't something like Parquet or JSON, S3 won't be a good fit.

Will you access this data for analytics purposes? If so, S3 has querying functionality like Athena and S3 Select. If it's instead for serving small files, S3 may not be a good fit.

Really, at PB scale these questions are all critically important and any one of them completely changes the article. There is no easy "store PB of data" architecture, you're going to need to optimize heavily for your specific use case.

comment 5y ago · link · parent

> is not a controversial statement in the software security community.

Funny how often this happens. Maybe we need to do a better job of conveying these sorts of things - happens all the time that the security community at large considers X or Y to be obvious and well known, and then you find that actually very large portions of the larger tech community don't know that at all.

comment 5y ago · link · parent

Oh cool, yeah I wasn't sure if they were talking specifically about DLL hijacking or about injection in general.

comment 5y ago · link · parent

What is trivial to protect against and how? I'm not aware of a general way to prevent an attacker within your user from accessing your process's memory, on any OS, except for a few newer capabilities on Windows, which are also bypassable.

comment 5y ago · link · parent

Yes, I'm aware of many, many people looking for crypto vulnerabilities. I'm not aware of many exploits in the wild.

comment 5y ago · link · parent

I'm just going by publicized, real world attacks, which I think fall under the 3 categories I listed.

> These vulnerabilities are discovered through testing and more importantly real world usage.

FWIW I disagree that real world usage is necessarily more important. It is quite important, but at the same time the real world usage isn't going to hit all sorts of weird quirky paths. By contrast, Rustls has 97% line coverage, OpenSSL has ~65%. Of course, coverage isn't everything, but that's notable.

> It's not a formal proof. It could still be wrong.

So long as the type system is sound, I'm not sure this is true. If you embed a state machine into your type system your type system guarantees that the state machine executes as defined. Granted this is not checking against an external model.

I will say that rustls still will benefit from wider adoption and more evaluation but imo it addresses the largest concerns today.

comment 5y ago · link · parent

Sure, but there's no evidence of that.

comment 5y ago · link · parent

> It's a slight improvement at best.

That's a hefty judgment. If we look at major attacks on TLS endpoints I'd summarize them as, in order,:

1. Memory safety

2. Weak / old configurations

3. Invalid state machine transitions

Rustls addresses all 3 of those, or at least it attempts to. (1) is obvious - it's rust. (2) rustls only supports the subset of TLS versions that are considered safe. (3) rustls avoids issues like gotofail and smacktls by encoding state machines as types, turning invalid state transitions into type failures.

Plus, the actual crypto primitives are extremely well tested and built off of other existing libraries.

So yeah, maybe some aspect of the crypto is incorrect, but, while interesting from an academic perspective, the real world ranks those other 3 things as way more important.

comment 5y ago · link · parent

> Now they need the relicensing in order for the business model to remain viable.

This is exactly what the parent is saying though. They're going through this process to ensure that their business remains viable and they can continue to build and support the project.

comment 5y ago · link · parent

Oh yeah, true true. You'll want to avoid using any company time, equipment (including the network), code, etc. and that should cover you, i think, but only so long as your work doesn't "compete" with your employers iirc.

comment 5y ago · link · parent

Non competes are illegal in California. But while you are employed by a company I believe that most contracts require that even outside of work the company owns your IP unless otherwise stated - that's why there's a bit in your contract where you can specify prior inventions and whatnot, I believe.

Every company I've worked for has had it this way.

comment 5y ago · link · parent

I don't want to say so authoritatively, but I don't believe so.

comment 5y ago · link · parent

Having repeatedly benchmarked my own rust builds I've found that the majority of time is spent linking. There are promising projects to improve that by an order of magnitude.

> I think the long compilation times will continue to get worse

No, it's more likely they'll get better - that has been the trend, and as I mentioned there are projects in the works that can likely cut the compile times in half.

comment 5y ago · link · parent

I've updated my post, though the legality is irrelevant - I haven't seen anyone complain that this is illegal but that it is unethical.

comment 5y ago · link · parent

Sorry, slipped up there, tax avoidance. So, to restate my question, is it not enough to understand that this is the double-irish is tax avoidance?

comment 5y ago · link · parent

Is it not enough to understand that this is the double-irish is tax evasion?

edit: tax avoidance* (this changes nothing about the intent of my question, but is literally incorrect)

comment 5y ago · link · parent

1. Even if we start today, and all new code is written in Rust, it will be years before Rust has an impact on compile time.

2. A relatively small portion of code can account for the majority of exploited vulnerabilities.

3. Nothing about Rust is fundamentally slow with regards to compile times. There's plenty of time to work on it, and we've already seen significant efforts make headway.

Compile times are a nonissue in any practical sense for this work.

comment 5y ago · link · parent

Well, 15KLOC, and of course not including dependencies. But my point was that there will be a tiny, tiny amount of Rust in the kernel by comparison to the 10s of millions of lines of C code. Rust would have to compile radically slower than C, like hundreds or thousands of times slower, in order to be a limiting factor.

comment 5y ago · link · parent

Yes... exactly. The Linux Kernel is 30 million lines of code - so how exactly will some minimiscule-by-comparison amount of Rust code slow down compile times considerably?

comment 5y ago · link · parent

Oh yeah, I 100% do not believe this would be something that ships to the kernel :)

comment 5y ago · link · parent

But we're not talking about making something illegal, this is a plea to not create a service specifically for children.

comment 5y ago · link · parent

That doesn't seem true. What if this were drugs? "Just leave that to the parents, don't force people to stop selling to kids"?

These days many kids have cell phones. For better or worse, that's what parents are doing. I don't know why, I'm not a parent and I don't know any children, but I know that as a young kid a cell phone allowed me to walk home alone or with another kid at an early age, so I can imagine justifications.

Anyway, I don't see why this should be on parents to manage, or how that would be effective.

comment 5y ago · link · parent

Yep, that sounds exactly right to me - about 30 minutes on older hardware. That's very odd to me that you have 30 minute rust build times - as someone who works on a rust project professionally, with 10KLOC, that isn't my experience at all. If Rust gets into the kernel I would expect it to account for <1% of the code, so even if it were 100x slower to compile, which it isn't, I don't see it having an impact.

comment 5y ago · link · parent

> a heavy enough runtime

Hey, asking out of pure ignorance - Why do you think this? My naive point of view is that the Linux kernel already has enough of a runtime to support such at hing - a scheduler, kernel threads, and interrupts.

An actor system shouldn't be particularly heavy - you can probably implement an actor in just a couple of bytes.

Agreed that it couldn't be a core part of Rust though.

Maybe it's too off topic or whatever, just curious.

1
100101102
164