mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1709] Viber profile report error! #1153
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#1153
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 @nemanjaf on GitHub (Jan 1, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1709
I tested firejail 0.9.52-1 with Viber desktop application on three Linux distribution and I always get the same warnings and error.
Has anyone tested a Viber profile before make commit?
@SkewedZeppelin commented on GitHub (Jan 1, 2018):
@chiraag-nataraj created the Viber profile long ago, I cleaned it up and added it. I did not not test it.
Can you edit /etc/firejail/Viber.profile, disable all the options, and re-enable them one by one until it crashes? I'd try commenting private-bin first. Thanks.
@nemanjaf commented on GitHub (Jan 1, 2018):
I commented Viber.local and globals.local lines because the specified files do not exist. Also, I change path for disable-common.inc, disable-devel.inc, disable-passwdmgr.inc and disable-programs.inc files from /etc/firejail/ to /usr/share/defaults/firejail/.
In the end, I had to comment these options also:
From my point of view, noroot and seccomp are very significant.
@netblue30 commented on GitHub (Jan 7, 2018):
Take a look at nonewprivs line in the profile. If it is working with it, probably one of the syscalls in default seccomp filter is killing it. I would say if nonewprivs is working, you should be fine.
Where is libqrencode.so installed?
@chiraag-nataraj commented on GitHub (Jan 7, 2018):
I had to comment the following from my Viber profile:
I'm not really sure why, though.
@chiraag-nataraj commented on GitHub (Jan 7, 2018):
Okay, I came up with a workaround for the issue with the home folder. Instead of using
whitelist, I end up usingprivate-home. I guess all this means is that I'll have to manually copy files from the Downloads directory if I want to store them using--get, but...oh well. Definitely more secure than what I had earlier. Also, apparently Viber is doing this super unsafe thing where it's making something executable in the home folder - I don't know what exactly and I don't know why, but it crashes/exits if I keepnoexec ${HOME}. Also, apparently it needs root because of the permissions on the libraries, but that doesn't really make sense given that they have o+rx permissions.@chiraag-nataraj commented on GitHub (Jan 7, 2018):
@nemanjaf, see if the attached profile works for you 🙂
Viber.txt
@smitsohu commented on GitHub (Jan 7, 2018):
@chiraag-nataraj It is a bit speculative, but do you wanna give it a try with
env QML_DISABLE_DISK_CACHE=1? In order to safe the noexec and maybe the whitelisting....@chiraag-nataraj commented on GitHub (Jan 8, 2018):
WHAT IS THIS MAGIC 😮😮😮
Yes, it worked!!!
[Edit] Still need to disable
noroot, but given that we're restricting it from having access to any actual files and heavily limiting the binaries it has access to...seems like it's suboptimal but tolerable.@smitsohu commented on GitHub (Jan 8, 2018):
@chiraag-nataraj The magic is taken care of by a bug in Qt ;)
@chiraag-nataraj commented on GitHub (Jan 8, 2018):
Ugh. Why is this even a thing? 😜 Anyway, at least we have a workaround 😂
@smitsohu commented on GitHub (Jan 8, 2018):
I googled a bit for Viber error messages, the app seems to use Qt webengine.
This means there might be a Chromium sandbox somewhere in the app, and this in turn could explain why the
seccompoption works fine for @chiraag-nataraj (with Debian), but breaks on distros with unprivileged user namespaces enabled (@nemanjaf what distro do you use?).If that's the problem, we would need to allow chroot syscalls and in the profile replace
seccompwith the following long line:seccomp.drop @clock,@cpu-emulation,@debug,@module,@obsolete,@raw-io,@reboot,@resources,@swap,acct,add_key,bpf,fanotify_init,io_cancel,io_destroy,io_getevents,io_setup,io_submit,ioprio_set,kcmp,keyctl,mount,name_to_handle_at,nfsservctl,ni_syscall,open_by_handle_at,personality,pivot_root,process_vm_readv,ptrace,remap_file_pages,request_key,setdomainname,sethostname,syslog,umount,umount2,userfaultfd,vhangup,vmsplice.For
protocol, I think it would be interesting to see ifprotocol unix,inet,inet6,netlinksolves the issue. Some messenger apps seem to need netlink for part of their functionality.To cut a long story short: @nemanjaf could you please try out if the following profile works for you? It is build on improvements suggested by @chiraag-nataraj 👍 and tries to take account of the various Qt peculiarities
@chiraag-nataraj commented on GitHub (Jan 8, 2018):
You could also try
env QTWEBENGINE_DISABLE_SANDBOX=1to disable the Qt sandbox.@netblue30 commented on GitHub (Jan 18, 2018):
Doing QML_DISABLE_DISK_CACHE=1 and QTWEBENGINE_DISABLE_SANDBOX=1 by default (hardcoded).
commit:
1e7045b55cGrab the latest from git and give it a try. Thanks.
@netblue30 commented on GitHub (Jan 19, 2018):
Moving the discussion to #1736, thanks for the bug.