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

OK, but Twitter is a special case. After the breach the FTC brought charges against Twitter and mandated that the company implement a more robust security program.

This should have hurt Twitter way more.

comment 4y ago · link · parent

Because the web isn't practically browsable without js, so rather than users fiddling with noscript and ending up disabling a ton of security features, instead they just turned js on.

comment 4y ago · link · parent

No, it does not mean there is "a way", it means that the name is the permission. Period. That is what a capability is. If the name is not the permission, it is not a capability.

comment 4y ago · link · parent

I wouldn't call it attack surface, I would call it a threat model. And yes, the threat model of capabilities includes the fact that knowledge of the capability connotes the capability. If it didn't, it wouldn't be a capability.

comment 4y ago · link · parent

So to recap, a capability is a value that represents authorization. The value must not be forgeable, the value must be communicable.

If I'm unable to convey authorization by giving you the token, it is not a capability. If I am able to guess the token, it is not a capability.

Delegation is not forgery. Forgery would be an entity creating a token without the token being delegated to that entity. Guessing is forgery, but you can "guess" a uuid in the same way that you can "break AES" with a bruteforce, which is to say, you can't.

comment 4y ago · link · parent

I think the short version is that you're just not talking about capabilities.

comment 4y ago · link · parent

Yes, accidentally sharing a capability is a leak. If I accidentally printed out a capability it would be 'leaked' and anyone who reads that capability now has obtained it an dcan use it.

> you can in principle forge a URL in a way that you could never forge a file handle.

Maybe it would be better to not talk about fs apis, because they're not really capability based, so I suspect that's the confusion.

The point is that if someone has a capability, they have that capability. There is no additional access control or checking in a capability based system. You absolutely have to consider things like rotation and revocation.

comment 4y ago · link · parent

A leaked capability is indeed a critical failure. There are multiple ways to deal with that.

1. Revocation is pretty critical

2. Bounding of capabilities is great - "You have this right for N seconds", meaning that a leak is less devastating

3. Not relying on capabilities is the best option. Capabilities are amazing, and a wonderful access control system. Their main benefit is that you can very naturally implement extremely fine grained access control. The downside is that it becomes hard to reason about that access control statically. ACLs are bad at super fine grained access control, but they're great for "I can look at a policy and know what this thing can/ can not do".

Layering ACLs and capabilities is a match made in heaven.

comment 4y ago · link · parent

"generally, in practice"

There's also openat on linux. My point is that the general, practiced approach is not capability based.

comment 4y ago · link · parent

To be clear, the answer to your question is "yes, you need a way to revoke capabilities if you care about them leaking", and the user who responded to you is incorrect.

comment 4y ago · link · parent

> It doesn't matter if the value is leaked, because it's meaningless to another process- like a file descriptor, it's just an entry in a table in the kernel, so it can only be used by the process it was granted to.

No, this is incorrect. Let's just quote wikipedia,

> A capability (known in some systems as a key) is a communicable, unforgeable token of authority.

communicable. It is practically the whole point that you can say "hey, here's a capability I have, now you have it".

Yes, it matters deeply if a capability is leaked. To name something is to authorize something, in capabality land.

No, you do not need to ask for it to be transferred. As with file descriptors in linux you can fork to delegate (or otherwise pass the handle around). Again, it is fundamental to capabilities that the capability is the authorization.

Dropbox's approach is faithful. And, in order to deal with these limitations of capability systems, Paper supports ACLs as well as capabilities. I think it's going to be a huge problem if Fuschia doesn't, but I don't know what they do - certainly some sort of MAC is desirable.

comment 4y ago · link · parent

How do you draw this conclusion from the article at all? In what way was this hacker 'restricted' ?

comment 4y ago · link · parent

Building an OS takes time, they're doing it incrementally, the bugs were known and even had issues for them already. I wouldn't draw any crazy conclusions from this research, this is a hacker's exploration of a foreign OS, which is very interesting, but isn't something I'd draw judgments from.

comment 4y ago · link · parent

KASLR is a pretty meh mitigation. But yeah, "todo" around capability checking probably should have been a higher priority fix.

comment 4y ago · link · parent

Yeah, reminds me of biscuits[0] - because they're based on asymmetric cryptography they can be delegated, but also attenuated. If you just use a uuid that's not really going to work as well, unless you're willing to go back to some authority to forge a new, lesser capability.

comment 4y ago · link · parent

After that first ~dozen words I gave an example, a counter example, and discussed why this is a somewhat fundamental issue.

comment 4y ago · link · parent

That is sort of the opposite of a capability. In fact, files are capabilities exactly because you can hand off a file descriptor and, by virtue of that handle, you grant access.

File systems aren't actually capability based (generally, in practice) because you can 'ls' and 'cd ../'. Otherwise they could be.

Dropbox Paper is a good example of a capability based system. Anyone with a URL can perform actions on a page, but there is no way to derive a URL without already having access to it, you must be told what it is. This is because the urls are sufficiently random so as to be unguessable.

comment 4y ago · link · parent

People say this about a lot of security things. Ultimately, a lot of security is about constraining systems, and that makes people nervous. When I got my first Android phone I could root it pretty trivially and run a fully customized ROM, these days it's not really practical on many devices.

And for the same exact reason that I have less control over my phone, I also trust it radically more for my current threat model.

iOS is maybe a counter-example. It relies a lot more on the walled garden, which helps a ton with malware, but not as much with "legit app got owned".

It's worth noting that you explicitly believe Android to be "free-er", even though I would say the average Android device is safer. The two things aren't always at odds, and with Android it's also very device specific.

Another good example is HSMs and TPMs. Many people fear that these devices are inherently untrustworthy, but they also drive a lot of important modern OS security.

My position here is that Linux is something of a disaster with regards to security and it truly can not get better for a number of pretty fundamental reasons. If I had Google money I'd absolutely be investing in ways of removing Linux from my security boundaries - something they've already done to some extent with gvisor.

comment 4y ago · link · parent

Scale to 0 and a managed runtime environment makes for a compelling service.

comment 4y ago · link · parent

Is there a good document comparing the two?

comment 4y ago · link · parent

Sure, but I don't think there's anything inherently wrong with incremental security.

comment 4y ago · link · parent

Not necessarily. You can design your system's security and then implement your features first. A good example would be "we know we need TLS, let's get a non TLS version up first and then add it before release".

Pretty typical imo

comment 4y ago · link · parent

It's not that big of a deal tbh and I'm actually not sure there's even a practical safety issue, though there could be bugs if the compiler makes some optimizations based on that (unlikely imo).

AFAIK on any typical platform there's no way you'd have "tearing" for a single byte ie: this will never store an invalid boolean representation.

comment 4y ago · link · parent

Rather than regulate the company it feels like the more common solution is to force companies to split up any vertical integrations in order to reduce the barrier to compete with them.

comment 4y ago · link · parent

Or people should stop using their product until they fix this.

comment 4y ago · link · parent

> They are legal judgments that in the end, if the case goes to trial, get made by juries. They are only "subjective" in that no person can truly see inside the mind of another, so everyone has to make their best judgment based on what they can see.

It's really nuts to me that "legal" And "subjective" are concepts you're trying to draw a hard line between. Of course all legal judgments are subjective - that is both obviously inherent as well as being a desirable feature. Yes, you nailed it, the jury system does indeed require a judgment based on the information as it is presented to them...

> Nobody even pretends that enforcement of speeding laws is a reasonable use of discretion on the part of law enforcement: enforcement is based on using such laws as a revenue source.

I mean, how does this support your case? Speeding laws are extremely black and white, there's very little legal discretion, the discretion is in terms of enforcement ie: are you getting pulled over. But it's not like you sit in front of a jury and present the facts, it's much closer to what you seem to be advocating for - a system with less human intervention.

> since fraud is already illegal, why should using a computer to commit fraud be any different from committing fraud some other way? Why not just enforce the laws we already have against fraud?

For like a million reasons lol I feel like this is just "I have no idea how the legal system works, but in my mind this whole thing is so simple, why not simply apply the law objectively?".

I mean god I don't even know where to start. Different types of fraud are going to have jurisdiction in different agencies. We fundamentally require different agencies because we have a federal and state legislature (and many other very good reasons) - so I guess if you want to remove states and "simplify" things, maybe you could start moving towards a single "fraud" construct?

There's also expediency and practicality, but that's more nuanced and I feel like if I have to explain "there's a federal and a state government" we shouldn't jump into how a law is made.

> But with the CFAA, it is. And we're supposed to be so pleased that now the prosecutors will be less draconian in making such judgments than they were before.

Multiple things can be true. The CFAA is broad and shitty. Also, the legal system is not some simple thing where you can just "objectively" enforce the law, nor should it be. If you want to say "the CFAA is overly broad" ok, cool. If you want to say "this isn't a good thing because this is just a policy, not a change in the law", ok sure.

But saying "We should have a singular objective definition of fraud" and acting like that's simple or achievable is plain naive, and this whole discretion argument almost feels irrelevant.

At this point I don't think you even know what you're trying to say, I'm gonna disengage. I would suggest you disentangle your points since it seems like you're trying to say a lot of different things.

comment 4y ago · link · parent

They haven't and they aren't.

comment 4y ago · link · parent

> I don't think people complain about lack of discretion with murder. I think people complain about too much discretion: obvious murderers are allowed to go free because of technicalities or political influence.

Discretion is literally built in ie: intent, malice, negligence, etc - these are all subjective judgments that I think any sane person supports. Accidentally killing someone should be treated very differently from planned murder - and we use subjective judgment to determine the case.

> No, it's a matter of discretion which gets charged, in the sense that the prosecutor cannot be forced to bring one particular charge or another; it's the prosecutor's choice. But in most cases, which charge best fits a particular set of facts should not be difficult to determine. And in a sane legal system which only focused on protecting basic rights instead of trying to micromanage everything, it wouldn't be.

First off, no, it is not the prosecutor's sole discretion. Obviously the prosecution (which is many people who form a consensus) brings the charges, but the defense may attempt a plea for a different charge, and the judge will instruct the jury on how to determine a conviction. Discretion is fundamental to the entire process, as it should be.

Second, notice that you're already saying things like "in most cases" ie: things are not 100% one way or the other.

> Discretion in rare edge cases is fundamental to the legal system. But as I commented elsewhere in this thread, if the need for discretion is common, then we aren't talking about edge cases; we're talking about a legal system that has gotten out of hand.

Discretion is already selectively applied. Not every case goes to a jury. We have different types of discretion, like civil law or arbitration. What no one is asking for is less discretion. "Zero tolerance" black and white policies are pretty much a disaster.

> I have no idea where you're getting that from since I explicitly said the government's basic job is to protect people's basic rights.

Maybe you should come out and say what those basic rights are and are not?

comment 4y ago · link · parent

People complain about lack of discretion with murder - that's why we have multiple degrees, and it's a matter of discretion (by many parties) which was committed.

Discretion is fundamental to the legal system. Any system that doesn't allow discretion is going to be a disaster - the world is complex, there's always nuance. It also leads to abuse, but I reject the idea that strict enforcement would solve abuse - but you've basically said "some laws" are bad laws so it's hard to say.

I suspect you're just saying "government should stay out of everything, that way people are free", and you're ignoring the fact that in a system like that no one's stopping a bunch of assholes from shitting on everyone else because it's not illegal.

1
434445
164