Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more ssh fixes #4675

Merged
merged 5 commits into from
Nov 11, 2021
Merged

more ssh fixes #4675

merged 5 commits into from
Nov 11, 2021

Conversation

glitsj16
Copy link
Collaborator

See 9a81078#commitcomment-59921139 for details. Basically this PR (no)blacklists /usr/lib/{open,}ssh instead of referencing all possible individual files that might get installed there depending on OS and versioning.

After seeing 9a81078 it dawned on me that Arch Linux doesn't have /usr/lib/openssh, but uses /usr/lib/ssh instead. That's a different path than what's referenced in our current {allow-ssh,disable-common}.inc files. Some very superficial checks revealed that OpenSSH seems to be packaged quite differently, at least on Debian/Ubuntu and Arch Linux. And then there's version differences on non-rolling distro's to consider. All in all IMO it makes more sense to (no)blacklist /usr/lib/openssh and /usr/lib/ssh instead of referencing all the possible individual files that live under those paths.
Counterpart fix for changes in allow-ssh.inc.
Copy link
Collaborator

@rusty-snake rusty-snake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fedora: /usr/libexec/openssh

Added Fedora path as per #4675 (review).
Added Fedora path as per #4675 (review).
NOTE: there are several other profiles touching /usr/libexec, so untill someone on Fedora can shed some light on what files are installed under /usr/libexec, I only blacklisted ssh-keysign. I'll pick this up tomorrow, a bit pressed for time in the non-digital worlds...
@glitsj16
Copy link
Collaborator Author

@rusty-snake I've added a fix for Fedora in allow-ssh.inc. The disable-common.inc part might be a bit more complex, due to several other profiles touching /usr/libexec (and being unfamiliar with Fedora). Feel free to make suggestions!

Suggested in #4675 (comment). Makes sense!
@glitsj16
Copy link
Collaborator Author

but then why not blacklist the whole /usr/libexec/openssh as well?

@reinerh Thanks for your review. I've brought in your suggestion. Not too clearheaded at the moment, great to see your in much better shape :-)

Copy link
Collaborator

@kmk3 kmk3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code changes LGTM.

Could you fixup/squash the commits?

Example: With git rebase -i "$(git merge-base master HEAD)".

Also, the first commit has a (non-auto-generated) line that's over 500 chars
long, which makes it hard to read (and makes it stand out) on git log.
Suggestion: Replace the message with a formatted version:

disable-common.inc: blacklist more ssh lib paths

After seeing 9a81078 it dawned on me that Arch Linux doesn't have
/usr/lib/openssh, but uses /usr/lib/ssh instead.  That's a different
path than what's referenced in our current
{allow-ssh,disable-common}.inc files.  Some very superficial checks
revealed that OpenSSH seems to be packaged quite differently, at least
on Debian/Ubuntu and Arch Linux.  And then there's version differences
on non-rolling distros to consider.  All in all IMO it makes more sense
to (no)blacklist /usr/lib/openssh and /usr/lib/ssh instead of
referencing all the possible individual files that live under those
paths.

Also, add Fedora paths as per:
https://github.com/netblue30/firejail/pull/4675#pullrequestreview-802438767

(The above would be the message of the final commit, after all the other commits
are fixedup/squashed)

@netblue30 netblue30 merged commit fbad5a5 into netblue30:master Nov 11, 2021
@netblue30
Copy link
Owner

Fixed, thanks!

@glitsj16 glitsj16 deleted the ssh-fixes branch November 11, 2021 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants