Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

playonlinux in firejail - internet connection issues? #3817

Closed
Rosika2 opened this issue Dec 14, 2020 · 8 comments
Closed

playonlinux in firejail - internet connection issues? #3817

Rosika2 opened this issue Dec 14, 2020 · 8 comments

Comments

@Rosika2
Copy link

Rosika2 commented Dec 14, 2020

Environment

Linux distribution and version: Lubuntu 18.04.5 KTS, 64 bit
Firejail version 0.9.64

Hello @rusty-snake,

so sorry to bother you again but there seems to be another problem when I run playonlinux within firejail.

On #3800 you have me a good piece of advice running the command
firejail '--noblacklist=/tmp/.wine-*' --private=media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/PLAYONLINUX playonlinux
which worked well.
Yet what I did at the time was running the programme "Notepad++". No problems there.

Now I wanted to install a tax-programme which didn´t go well.
In fact the installation process stopped at a certain point.

When I needed to insert the respective activation key the installation stopped - apparently because no internet connection could be established.
The key needs to be checked by the server of the tax programme I think.

As a consequence I tried the command
firejail '--noblacklist=/tmp/.wine-*' --noprofile --private=/home/rosika/Desktop/DATEN-PARTITION/Dokumente/versuch_für_playonlinux/ playonlinux

, so basically the same command plus "--noprofile".
That one did work. After inserting the registration code the installation proceeded as the code got checked by the server.
So internet connection was o.k.

The issue of internet connection is a mere guess of mine. But I couldn´t explain the difference of the two commands otherwise.

On https://gist.github.com/Rosika2/61f82c51565e48c89ad7d7aaa7ae7bfe I posted the output of the two commands as seen by the terminal. I hope it may be of some help.

I´d be glad if this issue could be solved as well.

Thank you so much in advance.

Many greetings.
Rosika

@rusty-snake
Copy link
Collaborator

This time I unfortunately have no idea what it could be 😞 . Because --noprofile works, the issues is in the profile. Can you copy the profile (cp /etc/firejail/playonlinux.profile ~/playonlinux.profile) and comment everything (noblacklist * and include allow-*.inc can be left uncommented). Then use firejail '--noblacklist=/tmp/.wine-*' --private=/home/rosika/Desktop/DATEN-PARTITION/Dokumente/versuch_für_playonlinux/ --profile=~/playonlinux.profile playonlinux to start and test it. Now uncomment line for line (or a block of lines) to see which line is causing it (and don't forget to save before testing ;) ).

If it is seccomp, journalctl --reverse | grep SECCOMP will show errors containg "playonlinux".

(Maybe it is here better to try from the other direction, meaning from a failing uncommented profile to a commented profile, as IDK if such activation-server like many tries with one key in a short time range.)

@Rosika2
Copy link
Author

Rosika2 commented Dec 14, 2020

@rusty-snake:

Hello once again and thank you so much for your help.

Following your instructions (it took quite a while) I found out that it is seccomp which has to be commented.
Any other entry may stay as they are in the /etc/firejail/playonlinux.profile.
And indeed I found the following:

journalctl --reverse | grep SECCOMP
Dez 14 15:26:23 rosika-Lenovo-H520e audit[32287]: SECCOMP auid=4294967295 uid=1000 gid=1000 ses=4294967295 pid=32287 comm="wineserver" exe="/home/rosika/.PlayOnLinux/wine/linux-x86/4.0.4/bin/wineserver" sig=31 arch=40000003 syscall=26 compat=1 ip=0xf7f42079 code=0x0

So thanks a lot again for making things work alright.

Many greetings abd stay safe.
Rosika

@Rosika2 Rosika2 closed this as completed Dec 14, 2020
@rusty-snake
Copy link
Collaborator

rusty-snake commented Dec 14, 2020

More secure is to whitelist only this syscall and keep the seccomp blacklist. firejail --debug-syscalls | grep 26 shows msync, but arch=40000003 is 32bit IIRC so ausyscall i686 26 shows ptrace. seccomp !ptrace or allow-debuggers (as in wine) should be the way to go.

@Rosika2
Copy link
Author

Rosika2 commented Dec 14, 2020

@rusty-snake:

Hi, thanks for the additional info which sounds very interesting.
But you got me here. I´m afraid I lack the respective knowledge to proceed in a way you suggested.

Yet I read up a bit on the matter consulting the man-pages and could follow to a certain extent.

−−allow-debuggers
Allow tools such as strace and gdb inside the sandbox by whitelisting system calls ptrace and
process_vm_readv.

So might the following command be the right one?

firejail --allow-debuggers '--noblacklist=/tmp/.wine-*' --private=/home/rosika/Desktop/DATEN-PARTITION/Dokumente/versuch_für_playonlinux/ playonlinux

Thanks a lot.
Greetings.
Rosika

@Rosika2 Rosika2 reopened this Dec 14, 2020
@rusty-snake
Copy link
Collaborator

Yes, looks good.

You can also create a playonlinux.local for all these additions.

@Rosika2
Copy link
Author

Rosika2 commented Dec 14, 2020

Hi,

firejail --allow-debuggers '--noblacklist=/tmp/.wine-*' --private=/home/rosika/Desktop/DATEN-PARTITION/Dokumente/versuch_für_playonlinux/ playonlinux
didn´t work after all.
The same problem seems to be there. The setup stops at the entry of the code. So internet connection seems to be refused once again.
Sorry about that.

Cheers.
Rosika

@rusty-snake
Copy link
Collaborator

Hmmm, assuming that there are still seccomp errors in the syslog. Either allow-debuggers didn't applied (maybe because of the 32bit syscalls) or something else. Anyway --ignore=seccomp --seccomp.drop=@default would be fine if it works.

@Rosika2
Copy link
Author

Rosika2 commented Dec 15, 2020

Hello @rusty-snake:

Thank you so much for your patience.

In fact your latest command works as desired. Perfect.
So I punched in
firejail --ignore=seccomp --seccomp.drop=@default '--noblacklist=/tmp/.wine-*' --private=/media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/Dokumente/versuch_für_playonlinux/ playonlinux

The playonlinux GUI opened up alright and this time the installation process of the tax programme would have proceeded (I aborted as it was a test now). The registration code I typed in was checked indeed which means internet connectivity is alright now.

So that´s the command I will stick to in the future.

Thanks again for your really great help. I´m so glad now.

All the best and have nice and healthy holidays.
Many greetings from Rosika

@Rosika2 Rosika2 closed this as completed Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants