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

Pony's object capabilities are one example of an existing implementation. I don't think there's any "inventing" To do here, it's all just implementation work.

comment 4y ago · link · parent

> if you know what the update contains?

I think anyone who thinks they're doing this is fooling themselves. You can review code for accidental vulnerabilities but if someone is trying to slip in a backdoor it shouldn't be hard to do so in a stealthy manner.

The reality is that the entire dependency concept is just broken. There is an implicit trust that all dependencies are equally trusted. Your logging package is just as capable of performing file and network operations as your http package, even if you assume it won't.

That's silly.

It is up to programming languages and package managers to solve these problems. They're also not that hard to solve, in my opinion. "Run arbitrary code on a computer" is a model we've been securing for decades with web browsers, both in terms of web pages and extensions, and now too with mobile.

Solving "this code can do X but that code shouldn't be able to" is similarly easy to solve with languages that support effects or capabilities.

It just hasn't been done yet.

comment 4y ago · link · parent

That doesn't really have to do with the ssh-agent or key forwarding though.

comment 4y ago · link · parent

Another thing that would be extremely helpful is improved logging. If the ssh-agent logged the entity that was attempting to hijack the connection it would be pretty easy to write detection logic for weird shit.

We'll probably publish about this in the next few months, my colleague added some logging and we wrote ~10 detections on the process tree + IPC signatures. It makes the entire attack extremely dangerous for an attacker.

comment 4y ago · link · parent

I don't think they're proposing their implementation is sufficient. ChaCha has a nonce for a reason.

comment 4y ago · link · parent

It's primarily targeting offline attacks ie: I've stolen your laptop or I am accessing it when you haven't decrypted it.

But there are also niche situations where an attacker has read permissions for files but not memory. It's atypical, but in cases where you have 'confused deputies' it happens - for example, if I have a service that attempts to safely broker reads to files but that service has a logic bug where a client can trick it into reading sensitive files.

The classic example of this is a path traversal in a web service.

Also, while there's no boundary, attackers are a lot happier reading files than memory. They're only human.

In general I find that, when you can, you should just encrypt your data. It can protect you in some surprising ways.

comment 4y ago · link · parent

I mean the original.

comment 4y ago · link · parent

It's going to depend on the database. This article is primarily focused on InnoDB and goes over the read/write locality issues with a uuid.

That isn't always going to matter (or can be a very good thing). For a KV store like dynamodb a uuid is a great key because it'll distribute nicely across your shards.

It also depends a lot on your query patterns. If you have a uuid primary key but you're partitioning by some other value you may end up significantly reducing the number of pages you have to look through.

comment 4y ago · link · parent

The linked article discusses the issues - the storage size when encoded as char, as 16byte values, as well as the impact on read/write locality.

comment 4y ago · link · parent

The initial statement was questioning their motives, not to remove the FOIA.

> My guess is it's a group of charlatans looking to sell their own COVID cures

comment 4y ago · link · parent

> Why do we care about this? Does he also have bad taste in summer outfits?

You can feign ignorance here but the answer is obvious. Anti-vax talking points are far more common in conservative media.

comment 4y ago · link · parent

The way I imagine this is best solved is by keeping a compressed set of tools on your host and then mounting those tools into a volume for your container.

So if you have N containers on a host you only end up with one set of tooling across all of them, and it's compressed until you need it.

You can decouple your test tooling from your images/containers, which has a number of benefits. One that's perhaps understated is reducing attacker capabilities in the container.

With log4j some of the payloads were essentially just calling out to various binaries on Linux. If you don't have those they die instantly.

comment 4y ago · link · parent

I agree that caches should get evicted more consistently.

comment 4y ago · link · parent

> Under high memory pressure

Just to again note that just because a program says it's using N MB of RAM doesn't mean that all of that RAM is actually paged in. Every thread you execute has an 8+MB stack but most of it won't get allocated for the majority of programs.

> we start digging into swap, and at that point, the UI is starting to significantly chug.

Only if you're constantly swapping in and out of swap. Just putting something into swap and never retrieving it won't case issues.

I'd generally recommend disabling swap altogether though and just letting OOM take out misbehaving processes.

This isn't all to say that using less memory is 'bad', but when people say 'oh that program is such a memory hog' I wonder if they might be measuring incorrectly, or not realizing what it's doing with that memory.

comment 4y ago · link · parent

Phones have gigabytes of RAM. It's a relatively niche situation where someone is running Chrome on < 1GB of RAM, which is less than what modern OS's require to begin with.

Besides, memory usage is hard to measure. Lots of memory may never get paged in.

comment 4y ago · link · parent

Unless you're seeing other processes crash because of a lack of RAM this isn't an issue, your OS will page things in/ out, including in Chrome, based on memory pressure.

comment 4y ago · link · parent

Who says using a ton of RAM isn't efficient? Unless your system OOMs what's the downside of having a bunch of allocated memory? Especially if it isn't even paged in.

comment 4y ago · link · parent

> How many Stanford graduates marry burger flippers?

That isn't necessarily Eugenics. If they think that "burger flippers" will produce inferior offspring, it's eugenics. But I suspect that if there is a low incidence of Stanford grads and "burger flippers" coupling it's due to other factors, for one thing the fact that they are two relatively small populations that likely have minimal interaction in a dating environment.

comment 4y ago · link · parent

Einstein opposed Nazi Germany (which aligned with eugenics) and outright rejected the idea of eugenics as a pursuit.

I suspect he would be disgusted at the idea of being used as an exemplar for eugenics.

comment 4y ago · link · parent

> This project promotes several other goals as well, such as promoting I/O safety concepts and APIs, helping test some of the infrastructure used by cap-std, and helping set the stage for future projects related to sandboxing, WASI, nameless, and other areas.

I'd be interested in hearing more about this. I have a lot of thoughts about sandboxing and Rust, including both build and runtime sandboxing. Would be cool to understand if others are working on this and chat about it. I'm familiar with cap-std, but curious about any other initiatives or where the discussions are happening.

comment 4y ago · link · parent

That's bad and annoying but it is not at all worse than useless. A hardware token is a very worthwhile investment.

comment 4y ago · link · parent

One option is to set your root user's password to some random 64 character string and forget it. Any time you want root access (rare) you go through a reset flow, which means your root auth is tied to your email. Something like GMail has pretty strict controls so this is actually imo the safest option available.

comment 4y ago · link · parent

Well, yeah, of course they're stuck with the bill. I feel like people think AWS is supposed to have infinite guard rails regardless of what the engineers using it do, like when people write code that infinite loops and it blows up their bill.

AWS gives money back in a lot of cases that I think they legitimately aren't responsible for.

I don't know that other cloud providers are going to do any better - an attacker who has your credentials and spins up 10's of thousands of dollars of infra will cost you thousands of dollars.

I'll certainly echo the advice for 2FA but, more importantly, use a strong, unique password.

comment 4y ago · link · parent

It seems nice to have both layers. mTLS is great, but you're still exposing your TLS stack to the attacker. Dropping the packet altogether seems nicer.

comment 4y ago · link · parent

For others who are curious, https://lwn.net/Articles/857228/

comment 4y ago · link · parent

I'd recommend to anyone running Linux that they do exactly that - disable unprivileged eBPF. For a server you shouldn't need that, you can just drop privs for your service after setting up the filter.

They should probably put it behind its own capability like CAP_LOAD_EBPF.

Forcing signed ebpf will also help though.

comment 4y ago · link · parent

Yeah, once you get to the ZKP approach, which is what you're describing, the benefits are more significant.

comment 4y ago · link · parent

> The upside of those tradeoffs are that it improves our query throughput by about 20% compared to simd_json

Woah, that's impressive.

I wonder if `str` is maybe an antipattern for a lot of JSON use cases where you can perform utf8 validation lazily or avoid it altogether for data you don't need.

Given a service architecture with mTLS, and so long as you aren't doing anything sensitive based on the data, I could see an approach like this being valuable.

That said, I also wonder if it's worth pushing JSON into use cases like this to begin with?

comment 4y ago · link · parent

Thanks that's pretty solid.

comment 4y ago · link · parent

I don't think Rice's theorem being proven invalid (or rather, more likely (but imo unlikely), P=NP) is important to this. In fact, a somewhat loose interpretation of Rice's theorem would imply that you can not "prove your way" out of having bugs of arbitrary classes, which seems entirely compatible with "our testing framework will find bugs".
1
666768
164