mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #446] Tightening the wine.profile #319
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#319
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 @curiosity-seeker on GitHub (Apr 16, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/446
This is a tentative wine.profile which attempts to tighten the existing one.
Notes:
Suggestions/ideas are highly welcome!
@chiraag-nataraj commented on GitHub (Apr 16, 2016):
Without using
private-bin, runsudo firemonand then runfirejail wine ...and see which binaries are called - that will give you an idea of which programs you need to add to your private-bin list. I would also suggest usingnet noneunless you routinely use Windows programs that need access to the interwebz - if you need to run a program once with internet, you can use--ignore=neton the command line to grant it one-time access.@curiosity-seeker commented on GitHub (Apr 17, 2016):
I had actually been running
sudo firemonbefore but when I had launched specific Windows applications - and it hadn't shown me other necessary executables. I hadn't thought of simply runningfirejail winein the console - thanks! I found that bash was missing.So the list that's working for me is:
private-bin wine,wine-preloader,wine64,wine64-preloader,wineboot,winebuild,winecfg,wineconsole,winecpp,winedbg,winedump,winefile,wineg++,winegcc,winemaker,winemine,winepath,wineserver,winetricks,xdg-open,update-desktop-database,bash@netblue30 commented on GitHub (Apr 17, 2016):
I am more worried about seccomp. It means some syscall is rejected and the process is trashed. Do you have any messages in syslog? In your case is handled by systemd. This is an example:
In syslog you would get:
where syscall 83 is mkdir:
@curiosity-seeker commented on GitHub (Apr 17, 2016):
Unfortunately seccomp doesn't work for me even in the default wine.profile so it's not related to mkdir.
Strangely
journalctl | grep auditorjournalctl | grep syscalldoesn't yield any results.If I execute a Windows program (using the default wine.profile) it's shown in
firejail --treelikebut the program doesn't launch.
The --debug option didn't reveal anything, either. I will try to find something with strace.
@curiosity-seeker commented on GitHub (Apr 18, 2016):
Using
strace -qcfI got the following list syscalls:Unfortunately, even with this long list my Windows programs don't launch. And as said above, journalctl doesn't report any syscalls. It might be necessary to install syslog-ng.
@mulecat commented on GitHub (May 26, 2016):
Adding to this that seccomp prevents some Wine programs from working. I'm running on Firejail 0.9.36 and custom profile for PlayOnLinux with --private=/myfolder. Looking through logs it seems that Race Driver: Grid crashes because ptrace is blacklisted.
Linux Mint 17.3 PlayOnLinux 4.2.2 using Wine version 1.9.1-staging.
@ghost commented on GitHub (Feb 10, 2018):
I know this is an old issue, but wanted to report that seccomp doesn't work for me either with wine in Arch linux (I had to comment it out in wine.profile).
@AitBits commented on GitHub (Mar 30, 2018):
I tried to run World of Tanks using wine, and the launcher was executing without problem. But the actual game client just went silent, and I searched it out to find the solution, then stumbled on this issue. I copied wine.profile from /etc/firejail to .config/firejail. Editing the file, I replaced seccomp with seccomp.drop to build default blacklist for seccomp explicitly as follows in the profile.
seccomp.drop mount,umount2,ptrace,kexec_load,kexec_file_load,name_to_handle_at,open_by_handle_at,create_module,init_module,finit_module,delete_module,iopl,ioperm,ioprio_set,swapon,swapoff,syslog,process_vm_readv,process_vm_writev,sysfs,_sysctl,adjtimex,clock_adjtime,lookup_dcookie,perf_event_open,fanotify_init,kcmp,add_key,request_key,keyctl,uselib,acct,modify_ldt,pivot_root,io_setup,io_destroy,io_getevents,io_submit,io_cancel,remap_file_pages,mbind,set_mempolicy,migrate_pages,move_pages,vmsplice,chroot,tuxcall,reboot,mfsservctl,get_kernel_syms,bpf,clock_settime,personality,process_vm_writev,query_module,settimeofday,stime,umount,userfaultfd,ustat,vm86,vm86old,afs_syscall,bdflush,break,ftime,getpmsg,gtty,lock,mpx,pciconfig_iobase,pciconfig_read,pciconfig_write,prof,profil,putpmsg,rtas,s390_runtime_instr,s390_mmio_read,s390_mmio_write,security,setdomainname,sethostname,sgetmask,ssetmask,stty,subpage_prot,switch_endian,ulimit,vhangup,vserverthen, as hinted by @mulecat, opted out ptrace from the list, and the game executed smoothly.
@curiosity-seeker commented on GitHub (Mar 30, 2018):
I haven't used wine recently so I haven't tried to solve the problem. However, as a general suggestion it might be worth trying
perfto get the syscalls used by a specific application.For the specified PID execute
sudo perf stat -e 'syscalls:sys_enter_*' -p PIDThe used syscalls are now counted until you press Ctrl-C. My impression is that this method is superior compared to using
strace -qcf.@chiraag-nataraj commented on GitHub (May 20, 2019):
If someone is interested in tightening the Wine profile, please submit a pull request! I'm going to go ahead and close this old thread since @curiosity-seeker stopped using wine ;P
@smitsohu commented on GitHub (Dec 12, 2019):
I took the liberty to upstream some of the ideas from this thread (also in
dcda92c278).Would be good to have the whitelisting, too, but I'm not familiar with wine myself, so didn't touch it.