[GH-ISSUE #966] after updating firejail screen and tmux terminal mixer cease to work #657

Closed
opened 2026-05-05 06:22:22 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @weeshy on GitHub (Dec 10, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/966

I had worked with the 0.9.40 version. In that time I used seccomp and capabilities restrctions together with the screen terminal mixer to run specific scripts.

Now I have updated to the 0.9.44.2 version. Both screen and tmux ceases to work. It is not something trivial like absence of /dev/pts. screen complies explicitly when there is no /dev/pts. But it simply writes [screen is terminating] and quits just after that when run inside firejail. tmux just silently quits after starting the session. In both cases screen\tmux --help works normally.

Could you suggest what can be the cause and how to track it?

Originally created by @weeshy on GitHub (Dec 10, 2016). Original GitHub issue: https://github.com/netblue30/firejail/issues/966 I had worked with the 0.9.40 version. In that time I used seccomp and capabilities restrctions together with the screen terminal mixer to run specific scripts. Now I have updated to the 0.9.44.2 version. Both `screen` and `tmux` ceases to work. It is not something trivial like absence of /dev/pts. `screen` complies explicitly when there is no /dev/pts. But it simply writes [screen is terminating] and quits just after that when run inside firejail. `tmux` just silently quits after starting the session. In both cases `screen\tmux --help` works normally. Could you suggest what can be the cause and how to track it?
gitea-mirror 2026-05-05 06:22:22 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@netblue30 commented on GitHub (Dec 11, 2016):

I'll take a look, thanks for the bug.

<!-- gh-comment-id:266282626 --> @netblue30 commented on GitHub (Dec 11, 2016): I'll take a look, thanks for the bug.
Author
Owner

@weeshy commented on GitHub (Dec 27, 2016):

I had disabpled seccomp and capabilities restrictions and tried to run screen with strace enabled.

tail -n 40 strace.log gives following output:

open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/shadow", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/shadow", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 19), ...}) = 0
readlink("/proc/self/fd/0", "/dev/pts/19", 4095) = 11
stat("/dev/pts/19", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 19), ...}) = 0
stat("/dev/pts/19", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 19), ...}) = 0
lstat("/dev", {st_mode=S_IFDIR|0755, st_size=280, ...}) = 0
lstat("/dev/pts", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
lstat("/dev/pts/19", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 19), ...}) = 0
lstat("/dev/pts/19", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 19), ...}) = 0
fcntl(0, F_GETFL)                       = 0x8002 (flags O_RDWR|O_LARGEFILE)
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
umask(0)                                = 077
access("/home/ayvango/.screen", F_OK)   = 0
stat("/home/ayvango/.screen", {st_mode=S_IFDIR|0700, st_size=40, ...}) = 0
umask(077)                              = 0
uname({sysname="Linux", nodename="paladin", ...}) = 0
rt_sigaction(SIGHUP, {0x428f40, [], SA_RESTORER, 0x7f1db919d320}, {SIG_DFL, [], 0}, 8) = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f1db9d369d0) = 105
setgid(1000)                            = 0
setuid(1000)                            = 0
rt_sigaction(SIGHUP, {0x428f40, [], SA_RESTORER, 0x7f1db919d320}, {0x428f40, [], SA_RESTORER, 0x7f1db919d320}, 8) = 0
rt_sigaction(SIGHUP, {0x428f40, [], SA_RESTORER, 0x7f1db919d320}, {0x428f40, [], SA_RESTORER, 0x7f1db919d320}, 8) = 0
rt_sigaction(SIGUSR1, {0x428d00, [], SA_RESTORER, 0x7f1db919d320}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGUSR2, {0x428cb0, [], SA_RESTORER, 0x7f1db919d320}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x428cd0, [], SA_RESTORER, 0x7f1db919d320}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTSTP, {0x428ca0, [], SA_RESTORER, 0x7f1db919d320}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGWINCH, {0x428cc0, [], SA_RESTORER, 0x7f1db919d320}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGALRM, {0x428c90, [], SA_RESTORER, 0x7f1db919d320}, {SIG_DFL, [], 0}, 8) = 0
alarm(15)                               = 0
pause()                                 = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGHUP {si_signo=SIGHUP, si_code=SI_USER, si_pid=105, si_uid=1000} ---
rt_sigaction(SIGHUP, {SIG_IGN, [], SA_RESTORER, 0x7f1db919d320}, {0x428f40, [], SA_RESTORER, 0x7f1db919d320}, 8) = 0
stat("/home/ayvango/.screen/105.pts-19.paladin", 0x7ffffb5c09b0) = -1 ENOENT (No such file or directory)
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=105, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
exit_group(0)                           = ?
+++ exited with 0 +++

<!-- gh-comment-id:269257850 --> @weeshy commented on GitHub (Dec 27, 2016): I had disabpled seccomp and capabilities restrictions and tried to run screen with strace enabled. `tail -n 40 strace.log` gives following output: ``` open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/etc/shadow", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/etc/shadow", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0 fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 19), ...}) = 0 readlink("/proc/self/fd/0", "/dev/pts/19", 4095) = 11 stat("/dev/pts/19", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 19), ...}) = 0 stat("/dev/pts/19", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 19), ...}) = 0 lstat("/dev", {st_mode=S_IFDIR|0755, st_size=280, ...}) = 0 lstat("/dev/pts", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 lstat("/dev/pts/19", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 19), ...}) = 0 lstat("/dev/pts/19", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 19), ...}) = 0 fcntl(0, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE) ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0 umask(0) = 077 access("/home/ayvango/.screen", F_OK) = 0 stat("/home/ayvango/.screen", {st_mode=S_IFDIR|0700, st_size=40, ...}) = 0 umask(077) = 0 uname({sysname="Linux", nodename="paladin", ...}) = 0 rt_sigaction(SIGHUP, {0x428f40, [], SA_RESTORER, 0x7f1db919d320}, {SIG_DFL, [], 0}, 8) = 0 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f1db9d369d0) = 105 setgid(1000) = 0 setuid(1000) = 0 rt_sigaction(SIGHUP, {0x428f40, [], SA_RESTORER, 0x7f1db919d320}, {0x428f40, [], SA_RESTORER, 0x7f1db919d320}, 8) = 0 rt_sigaction(SIGHUP, {0x428f40, [], SA_RESTORER, 0x7f1db919d320}, {0x428f40, [], SA_RESTORER, 0x7f1db919d320}, 8) = 0 rt_sigaction(SIGUSR1, {0x428d00, [], SA_RESTORER, 0x7f1db919d320}, {SIG_DFL, [], 0}, 8) = 0 rt_sigaction(SIGUSR2, {0x428cb0, [], SA_RESTORER, 0x7f1db919d320}, {SIG_DFL, [], 0}, 8) = 0 rt_sigaction(SIGINT, {0x428cd0, [], SA_RESTORER, 0x7f1db919d320}, {SIG_DFL, [], 0}, 8) = 0 rt_sigaction(SIGTSTP, {0x428ca0, [], SA_RESTORER, 0x7f1db919d320}, {SIG_DFL, [], 0}, 8) = 0 rt_sigaction(SIGWINCH, {0x428cc0, [], SA_RESTORER, 0x7f1db919d320}, {SIG_DFL, [], 0}, 8) = 0 rt_sigaction(SIGALRM, {0x428c90, [], SA_RESTORER, 0x7f1db919d320}, {SIG_DFL, [], 0}, 8) = 0 alarm(15) = 0 pause() = ? ERESTARTNOHAND (To be restarted if no handler) --- SIGHUP {si_signo=SIGHUP, si_code=SI_USER, si_pid=105, si_uid=1000} --- rt_sigaction(SIGHUP, {SIG_IGN, [], SA_RESTORER, 0x7f1db919d320}, {0x428f40, [], SA_RESTORER, 0x7f1db919d320}, 8) = 0 stat("/home/ayvango/.screen/105.pts-19.paladin", 0x7ffffb5c09b0) = -1 ENOENT (No such file or directory) --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=105, si_uid=1000, si_status=0, si_utime=0, si_stime=0} --- exit_group(0) = ? +++ exited with 0 +++ ```
Author
Owner

@weeshy commented on GitHub (Dec 27, 2016):

It's clearly related to /dev/tty. The old configure file used whitelisted /dev and the screen just silently exits inside firejail.

I tried to switch configuration from whitelist on /dev to private-dev and the screen behaviour has changed. Now it complains

Must be connected to a terminal.

So I clearly should do something smart with /dev/tty but I haven't decided yet what exactly.

<!-- gh-comment-id:269259787 --> @weeshy commented on GitHub (Dec 27, 2016): It's clearly related to `/dev/tty`. The old configure file used whitelisted `/dev` and the screen just silently exits inside firejail. I tried to switch configuration from whitelist on `/dev` to `private-dev` and the screen behaviour has changed. Now it complains > Must be connected to a terminal. So I clearly should do something smart with /dev/tty but I haven't decided yet what exactly.
Author
Owner

@chiraag-nataraj commented on GitHub (Aug 20, 2018):

@weeshy Do you still have this problem? What profile are you using?

<!-- gh-comment-id:414361776 --> @chiraag-nataraj commented on GitHub (Aug 20, 2018): @weeshy Do you still have this problem? What profile are you using?
Author
Owner

@chiraag-nataraj commented on GitHub (May 20, 2019):

Closing due to no response. @weeshy, please feel free to re-open if you have updated information.

<!-- gh-comment-id:494085709 --> @chiraag-nataraj commented on GitHub (May 20, 2019): Closing due to no response. @weeshy, please feel free to re-open if you have updated information.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#657
No description provided.