mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1778] Unable to whitelist /dev/stdin unless there's a pseudo-terminal #1204
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#1204
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 @maz on GitHub (Feb 17, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1778
/dev/stdinwon't appear in/dev, even if whitelisted, unless there's a pseudo-terminal allocated.I'm running
Ubuntu 16.04.3 LTSwith Linux kernel4.13.0-32-genericTest case:
In theory, /dev/stdin should be listed in all cases.
@netblue30 commented on GitHub (Feb 19, 2018):
It seems to be working from a regular xterm:
We do miss them however in --private-dev, I'll add stdin, stdout and stderr.
@maz commented on GitHub (Feb 21, 2018):
Try the
ssh -t localhost 'firejail --noprofile --quiet --whitelist=/dev/stdin -c ls -l /dev'command. I found that if I executed the command, from a process that didn't have a pseudoterminal allocated (e.g. using ssh with the-toption), then it wouldn't work. I think the problem is that, when there's no pseudoterminal,/dev/stdinis a symlink to/proc/self/fd/0, and not to/dev/pts/...@netblue30 commented on GitHub (Mar 5, 2018):
At least under a regular terminal it is a link to /proc/self/fd/0, so whitelist should duplicate the link, not move it under /dev/pts. It looks like a bug!
@netblue30 commented on GitHub (Mar 6, 2018):
I think I have a fix in (
dda8b2dbaf):You can give it a try, thanks.
firejail --list#1228