[GH-ISSUE #762] firejail not exiting #516

Closed
opened 2026-05-05 06:01:48 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @reinerh on GitHub (Sep 2, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/762

When running seccomp-ptrace.exp, firejail doesn't exit and continues running.
To reproduce:

$ firejail --noprofile --seccomp
...
$ strace ls
...
$ exit

Originally created by @reinerh on GitHub (Sep 2, 2016). Original GitHub issue: https://github.com/netblue30/firejail/issues/762 When running seccomp-ptrace.exp, firejail doesn't exit and continues running. To reproduce: > $ firejail --noprofile --seccomp > ... > $ strace ls > ... > $ exit
gitea-mirror 2026-05-05 06:01:48 -06:00
Author
Owner

@netblue30 commented on GitHub (Sep 3, 2016):

What distro are you testing on?

<!-- gh-comment-id:244550122 --> @netblue30 commented on GitHub (Sep 3, 2016): What distro are you testing on?
Author
Owner

@reinerh commented on GitHub (Sep 3, 2016):

Debian unstable

<!-- gh-comment-id:244550806 --> @reinerh commented on GitHub (Sep 3, 2016): Debian unstable
Author
Owner

@netblue30 commented on GitHub (Sep 3, 2016):

OK, I'll give it a try on sid.

<!-- gh-comment-id:244568579 --> @netblue30 commented on GitHub (Sep 3, 2016): OK, I'll give it a try on sid.
Author
Owner

@reinerh commented on GitHub (Sep 4, 2016):

After strace is "killed" with "Bad system call", there is still a "strace ls" process listed in the process list.
When this is killed manually with SIGTERM, it's possible to leave the firejail normally.

<!-- gh-comment-id:244622877 --> @reinerh commented on GitHub (Sep 4, 2016): After strace is "killed" with "Bad system call", there is still a "strace ls" process listed in the process list. When this is killed manually with SIGTERM, it's possible to leave the firejail normally.
Author
Owner

@netblue30 commented on GitHub (Sep 5, 2016):

In a separate terminal I run "sudo firemon" - it tells me what processes are created inside the sandbox when I run "strace ls":

09:24:12 fork 1228 (netblue) /bin/bash 
        child 1242 /bin/bash 
09:24:12 exec 1242 (netblue) strace ls 
09:24:12 fork 1242 (netblue) strace ls 
        child 1243 strace ls 
09:24:12 exit 1242 (netblue)

strace (PID 1242) forks a child process (1243), then it is killed by seccomp. The child doesn't shut down.

I copied strace from jessie on my sid box, and tried with the old strace executable:

09:23:55 fork 1228 (netblue) /bin/bash 
        child 1239 /bin/bash 
09:23:55 exec 1239 (netblue) ./jessie-strace ls 
09:23:55 fork 1239 (netblue) ./jessie-strace ls 
        child 1240 ./jessie-strace ls 
09:23:55 exit 1239 (netblue)
09:23:55 exit 1240 (netblue)

When jessie-strace gets killed, the child process terminates. I would say it is a problem with strace. Somehow in the old strace the child closed automatically when the parent died.

<!-- gh-comment-id:244795573 --> @netblue30 commented on GitHub (Sep 5, 2016): In a separate terminal I run "sudo firemon" - it tells me what processes are created inside the sandbox when I run "strace ls": ``` 09:24:12 fork 1228 (netblue) /bin/bash child 1242 /bin/bash 09:24:12 exec 1242 (netblue) strace ls 09:24:12 fork 1242 (netblue) strace ls child 1243 strace ls 09:24:12 exit 1242 (netblue) ``` strace (PID 1242) forks a child process (1243), then it is killed by seccomp. The child doesn't shut down. I copied strace from jessie on my sid box, and tried with the old strace executable: ``` 09:23:55 fork 1228 (netblue) /bin/bash child 1239 /bin/bash 09:23:55 exec 1239 (netblue) ./jessie-strace ls 09:23:55 fork 1239 (netblue) ./jessie-strace ls child 1240 ./jessie-strace ls 09:23:55 exit 1239 (netblue) 09:23:55 exit 1240 (netblue) ``` When jessie-strace gets killed, the child process terminates. I would say it is a problem with strace. Somehow in the old strace the child closed automatically when the parent died.
Author
Owner

@chiraag-nataraj commented on GitHub (Jul 30, 2018):

Still an issue! But if it's a problem with strace, I guess we can close this?

<!-- gh-comment-id:408888629 --> @chiraag-nataraj commented on GitHub (Jul 30, 2018): Still an issue! But if it's a problem with `strace`, I guess we can close this?
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#516
No description provided.