mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3780] whois profile block hostname resolution via getaddrinfo (Name or service not known) #2381
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#2381
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 @MiltosKoutsokeras on GitHub (Nov 28, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3780
The
whoisprogram cannot resolve hostnames when its profile is enabled in firejail.Bug and expected behavior
whoisprofile in/etc/firejail/whois.profiledoes not allow hostname resolution andgetaddrinfofails withName or service not known.whoisshould return the ARIN WHOIS data record, resolving the service to ask (whois.arin.net in my case) and the query object.No profile and disabling firejail
firejail --noprofile /path/to/programin a terminal? Works as expected.which <program>orfirejail --listwhile the sandbox is running)? Running the program by path:wields the same result, firejail list:
Running the program with original path
/usr/bin/whoisdoes not showcases the error. can be any host or IP address you would like to query, e.g. github.com.Reproduce
Steps to reproduce the behavior:
firejail whois github.comgetaddrinfo(<Whois service here>): Name or service not knownEnvironment
Additional context
I think the
whoisprogram is not allowed to read the hostname resolution configuration of the system environment. Since each Linux distribution has its own setup for this (systemd, files, other) the maintainers should look into it in more detail and per environment.Checklist
https://github.com/netblue30/firejail/issues/1139)--profile=PROFILENAMEis used to set the right profile.LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 PROGRAMto get english error-messages.@rusty-snake commented on GitHub (Nov 29, 2020):
whois github.comworks for me, but fedora has an other whois implementation IIRC. Anyway if it's a config thing it'sprivate-etc.protocolhas nounix, this could also be a cause. What showsfirejail --build=whois.profile whois github.com && grep private-etc whois.profile?@ghost commented on GitHub (Dec 10, 2020):
On my Arch box all the below commands show the
getaddrinfofailure, suggesting this is not a firejail issue:After some digging I stumbled on this. And indeed, none of the below commands show the
getaddrinfofailure:@MiltosKoutsokeras commented on GitHub (Dec 12, 2020):
It would possibly be a matter of combination between whois, resolver and maybe firejail. I noticed in my system that once firejail is not used, the whois works.
@rusty-snake commented on GitHub (Jan 4, 2021):
Any progress here?
@rusty-snake commented on GitHub (Apr 6, 2021):
I'm closing here due to inactivity, please fell free to request to reopen if you still have this issue.