mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #5625] ssh: Mounting noexec /home/<homedir> not working. #3049
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#3049
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @slush0 on GitHub (Jan 27, 2023).
Original GitHub issue: https://github.com/netblue30/firejail/issues/5625
Description
Hello, I have remote smb mounts in /home//shares (over the internet). I've been successfully using firejail for weeks, but now I realized when my machine is disconnected and those shares are not working, I cannot use ssh at all (to reach local network machines, for example), because it fails on Mounting noexec /home/.
I don't know exactly how "mounting noexec" works internally and why it is necessary for ssh, but I suppose this is rather issue of firejail to block ssh from starting. Strangely enough, other firejail apps working fine for me (for example Firefox start normally even when my internet connection is down.
Steps to Reproduce
Expected behavior
ssh should work normally even when it cannot remount non-working mounts in home dir. ssh works as expected when I call directly
/usr/bin/ssh(without firejail).Actual behavior
ssh doesn't work with default ssh.profile.
Behavior without a profile
/usr/bin/ssh works as expected.
Environment
Checklist
/usr/bin/vlc) "fixes" it).https://github.com/netblue30/firejail/issues/1139)Log
After running "firejail --debug ssh ", I see following lines at the end of the run:
@slush0 commented on GitHub (Jan 27, 2023):
To avoid confusion, 192.168.69.x is on a remote VPN (unavailable at the time of trying ssh), not a local network, despite the host being names nas01.lan.
@ghost commented on GitHub (Jan 27, 2023):
Having
include disable-exec.incin a Firejail profile is just another option to create a tight sandbox. IMO there's nothing special about having it in ssh.profile. Firefox without active network connection being able to start has nothing to do with files under ${HOME} being mounted noexec so I wouldn't call that 'strange'.Have you tried using an override like the below yet to check if that solves your SMB shares isue?
@rusty-snake commented on GitHub (Jan 27, 2023):
Firefox, in contrast to ssh, can start because it has a whitelisting profile and
~/sharesdoes not have to be remounted I guess. You can try withfirejail --whitelist=~/shares /usr/bin/firefox.@slush0 commented on GitHub (Feb 1, 2023):
I'm not sure if we're on the same page. My primary concern is if mounting/remounting shares in $HOME is necessary/ok in ssh profile. I don't understand firejail deep enough to tell this, but my feedback is that the default ssh profile is crashing ssh on something it should not crash on. I'm not experiencing this issue with any other firejail-protected app.
@slush0 commented on GitHub (Feb 1, 2023):
That said, adding
ignore noexec ${HOME}into ssh.local fixes my issue.