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

> Yeah it's pretty much your best option (C or C++) when writing web apps for things like routers or for game consoles for example,

Why? This library obviously assumes you have an operating system running, so it's not that constrained of an environment.

comment 4y ago · link · parent

Oh yeah, is this not a clear bypss? Write an executable file to disk and then... execute it. As far as I know that is all that's required to completely bypass pledge?

I assume/ hope this is something you can control with better filesystem controls?

comment 4y ago · link · parent

> The OpenBSD way is to do things that could be abused later early and then drop privs to prevent abuse.

That is the approach if you can't regain privileges. In the OpenBSD way it is literally the opposite of waht you propose.

> How is some program going to know what other programs you use will need?

It doesn't? Same issue on linux/openbsd in that regard, with some aspects a bit different due to libc.

> How is the dynamic linker of the later program supposed to deal?

It obviously doesn't, again, same thing on Linux and OpenBSD. It also won't help you to be able to regain privileges via exec if the issue is a shared library.

Allowing for privileges to not propagate is a cool feature that allows you to shell out to a binary that you can't write to (otherwise it's pointless) and have that binary manage its own permissions. That's sometimes important, and Apparmor supports that sort of thing (with child profiles).

But it's also a big footgun that can easily allow a full sandbox bypass.

You can implement the child profile concept easily enough with a privileged broker anyway.

comment 4y ago · link · parent

What about Manhattan? What about lower Manhattan? The reality is that NYC is large and there's bodies of water separating huge parts of the city. Talking about crime in NYC seems really silly because you're going to be talking about tons of neighborhoods that you're just never, ever going to end up even close to.

comment 4y ago · link · parent

That's a good thing.

comment 4y ago · link · parent

> - the "exec" promise cannot elevate privileges again, as it does in OpenBSD

I agree with all of this fwiw, but I actually was very glad to see this. I find it really weird that the openbsd pledge lets you just escalate out of it.

comment 4y ago · link · parent

I would really like to see more minion gifs in your posts

comment 4y ago · link · parent

Or don't, because all of those things are great. Compile times aren't that bad unless you're doing a clean uncached build, which is very unlikely.

comment 4y ago · link · parent

If you want to get the root password hash into memory, just run sudo, or any other root process that reads /etc/shadow. It'll probably get it mapped into the file system cache, but it'll certainly get it mapped into that process's memory - albeit potentially temporarily.

I don't know that sudo takes any measures to protect that memory. You say "lots of modern software" but it's more like "the extreme minority of software" with regards to security effort.

comment 4y ago · link · parent

I agree that most attackers aren't going to use this attack, but only because privesc through standard means is well documented and researched. It wouldn't make sense to weaponize this sort of attack while the existing attacks continue to work.

But otherwise you're putting way too much stock into your examples annoying attackers out of their work. I assure you, exploit developers will sit there and stare at hex dumps and put enough of those primitives together to build the exploit chain they need.

It's purely because security's such a shitshow in other ways that we don't see more attacks leveraging this sort of thing. If someone (like Jann) does enough research, puts it out there, and this becomes something that more hackers are comfortable with, they'll absolutely use this.

comment 4y ago · link · parent

219bytes per second is extremely practical, not sure why you think it isn't. Like, that is plenty. Linus's statement was sheer ignorance, as usual.

comment 4y ago · link · parent

> Those people (a minority for sure) know who they are,

I highly doubt that. Most developers, by far, could not tell you the threat model for these attacks.

> but we shouldn't be crippling the performance of everyone else just for them.

You can turn the mitigations off.

comment 4y ago · link · parent

(non expert thoughts ahead!)

> What's next? Can this effect be mitigated in the next round of design?

Yes. PCID is one example.The PCID, or Process IDentifier, lets the CPU avoid flushing the TLB on every context switch. Similar approaches could be taken to let the CPU know "this is not a situation where you need to be extra careful, you can be extra fast".

There are likely other hardware approaches that could help. I doubt we can ever get to "100% of the performance is back" because a side channel is always going to be possible if specific operations have specific effects like timing differences, but we can probably get to 99%. PCID alone drops the performance hit of kpti in half (or so).

> Also, what can be done on the software side?

memfd_protect is a cool thing that kinda helps in theory. There's probably a lot of stuff processes could do to protect themselves, in theory.

> Why is Linux so vulnerable, but not Windows?

I can only assume because Microsoft cared more to solve the problem. Windows implements a more complete mitigation than Linux, someone else can provide sources to the discussions that led to Linux's approach.

comment 4y ago · link · parent

> Presumably under very ideal conditions?

Maybe? You could also assume that the attack will get faster in the future.

Sidechannel attacks like this are situationally impactful. Most desktop users don't have to care about security much at all on Linux. Further, they probably don't have to care about any privescs. But some people have threat models that change that.

comment 4y ago · link · parent

Is that the problem?

1. Most hosts have some secrets. For example, client credentials. That's hard to avoid unless you just don't do auth at all.

2. Most hosts let users ssh to them.

3. What you've described is the cloud provider/ PaaS model.

4. It's not that easy to just "keep untrusted code" out. Like, what if an attacker exploits an exposed service and then wants to privesc?

comment 4y ago · link · parent

Someone should create an index of "Linus said this attack was impractical/ unimportant". I can think of a number of great examples off the top of my head.

comment 4y ago · link · parent

I clicked that and it says it's a dupe. So like, should I be talking here or there?

comment 4y ago · link · parent

No I do not lol

comment 4y ago · link · parent

Reminds me of the questions we got when we were going into 5th grade and had to get placed.

comment 4y ago · link · parent

> One difference I perceive between a child an a neural network is that it appears a child does not start from a blank slate. The brain of a baby seems to come hard-wired with some basic instinctual functionality like grabbing and object tracking.

I think that's likely, but also babies have ~9 months of development, at least some of that time (3-6 months) they're moving around/ have a brain.

comment 4y ago · link · parent

That would be assault.

comment 4y ago · link · parent

If you can't see why AZ is a shithole you might be the problem.

comment 4y ago · link · parent

You can politely ask me not to do that. Legally preventing me from doing that is unconstitutional.

comment 4y ago · link · parent

People are allowed to screech. It's kind of an important part of the constitution.

comment 4y ago · link · parent

I'm sure every cop will pull out their ruler and measure it out accurately lol

comment 4y ago · link · parent

Remember that this is Arizona, a known shithole state. Whatever interpretation of this law that you're using to paint it in a softer light, understand that it's not coming from a place of "let's help police protect people".

comment 4y ago · link · parent

The police are the white supremacists. The 2006 FBI report has some interesting documentation on the white supremacist police infiltration efforts.

https://oversight.house.gov/sites/democrats.oversight.house....

comment 4y ago · link · parent

Except when you were recording you weren't party to the police interaction. So you were breaking the law. Can you follow that logic?

comment 4y ago · link · parent

> This is likely to strengthen the ability for people to document policing.

God I hope this is the stupidest thing I read today.

comment 4y ago · link · parent

As close as I want to be, if it's a public space.
1
363738
164