Live data from Hacker News

Don't tug on that, you never know what it might be attached to

blog.plover.com

11–20 of 98 posts

Re: Don't tug on that, you never know what it might be attached to

#11
post #10

No reference to the full quote? :) "You can check your anatomy all you want, and even though there may be normal variation, when it comes right down to it, this far inside the head it all looks the same. No, no, no, don't tug on that. You never know what it might be attached to. " - Buckaroo Banzai

Which reminds me, I have to re-watch that movie!

Re: Don't tug on that, you never know what it might be attached to

#12
post #9

What's funny is that in this case the dynamic loader was sanitising something irrelevant to the actual capability granted, which seems to me should be a bug. Also, I'll be an advocate for just starting emacs with systemd, and never worrying about it again.

> What's funny is that in this case the dynamic loader was sanitising something irrelevant to the actual capability granted, which seems to me should be a bug.

EDIT: fixed incorrect description of the yak-shaving conclusion.

The dynamic loader did so because it ran with an extra capability that the user invoking it didn't already have. Most of that sanitizing exists to prevent the user from gaining those privileges themselves by invoking a more privileged program, such as by setting LD_LIBRARY_PATH. Sanitizing TMPDIR prevents a somewhat different class of vulnerabilities, such as using those extra privileges to write to files you normally couldn't. However, I don't think it makes sense to have a complex special case like "if you only have one of this subset of extra privileges, allow TMPDIR but don't allow all the other potentially dangerous environment variables"; that adds a significant amount of complexity and subtlety to already security-sensitive code.

Giving /usr/bin/perl itself extra capabilities effectively grants them to every user on the system, since you can use Perl to run arbitrary code. At that point, it would make more sense to just allow all non-root users to bind to arbitrary ports. I'm somewhat surprised that there isn't a sysctl to disable the reservation of ports 0-1023.

Re: Don't tug on that, you never know what it might be attached to

#13
Environmental variables have caused some of my more troublesome debugging experiences:

1) On Windows, VisualVM not being able to find the IntelliJ IDEA process I had running. This happened because IDEA was started with Launchy, which had a different TMP directory set, because I used both RDP and the Console, or something.

2) On Linux, ibus IMEs not working at all in my browsers; happened because I was starting them in a tmux, and the tmux server was started in my previous login session, so the DBUS_SESSION_BUS_ADDRESS in the tmux was stale.

Re: Don't tug on that, you never know what it might be attached to

#14
You should definitely tug on things when you have a controlled test environment and the time to explore what-ifs.

Much like companies should try to replace their own products (before a competitor does), infrastructure teams need to force “predictable” upgrades in a controlled environment on a regular basis. For example: look at your dependencies, imagine what upgrades are likely to be required in the near future, and try making those upgrades on test systems to see what could go wrong.

That approach achieves three things. One, since you’re not in emergency mode and you’ve used a test environment, any problems that you do uncover are not going to cause a crisis. Two, if you do this semi-regularly then you’re likely to see only minor issues. Third, exploratory upgrades give you a lot of time to fix problems (whether it’s time for your own developers to make changes, or time to wait for an external open-source-project/vendor to make changes for you).

Re: Don't tug on that, you never know what it might be attached to

#16

Great debugging, and an example of the sort of behaviour that long dependency chains can expose. Or rather, I did until this week, when it suddenly stopped working. When this happens to me, the first thing that I ask myself is "what changed?", and I'm usually able to track down the cause to some configuration change. Incidentally, this is also why I never like modifying a working system unless it's absolutely necessa…

> Incidentally, this is also why I never like modifying a working system unless it's absolutely necessary.

It's why I find auto-updating apps so infuriating. The trend is that every app, OS, and driver insists on being self-updating. It's going to be very difficult to maintain a reliable system if you're doing anything complex.

Privacy issues aside, that's another reason I never plan to use the continuously self-updating Windows 10.

Re: Don't tug on that, you never know what it might be attached to

#17
post #15

I read this, but seemed to skip over the part where he explains why this changed suddenly, when the behavior was documented? What changed to make the perl become capable whereas previously it lacked the low port capability?

That seems to be a site-specific configuration.

Re: Don't tug on that, you never know what it might be attached to

#18
post #10

No reference to the full quote? :) "You can check your anatomy all you want, and even though there may be normal variation, when it comes right down to it, this far inside the head it all looks the same. No, no, no, don't tug on that. You never know what it might be attached to. " - Buckaroo Banzai

Fantastic movie. I don't remember that quote though. My go-to quote has always been "Remember, no matter where you go, there you are."

Re: Don't tug on that, you never know what it might be attached to

#19
post #15

I read this, but seemed to skip over the part where he explains why this changed suddenly, when the behavior was documented? What changed to make the perl become capable whereas previously it lacked the low port capability?

He usually started emacs directly. In this case he started emacs via a perl command, very very indirectly.

Also, a recent change was an admin setting TMPDIR, previously it had been left unset.

So it was a combination of two things that triggered it, and not one alone.

Re: Don't tug on that, you never know what it might be attached to

#20
post #9

What's funny is that in this case the dynamic loader was sanitising something irrelevant to the actual capability granted, which seems to me should be a bug. Also, I'll be an advocate for just starting emacs with systemd, and never worrying about it again.

> the dynamic loader was sanitising something irrelevant to the actual capability granted

No. You can theoretically use tmp to gain any privilege. So anything extra at all must be blocked.

Post reply on HN