[GH-ISSUE #6035] lutris: Ubisoft Connect: Error at hooking API #3164

Closed
opened 2026-05-05 09:47:23 -06:00 by gitea-mirror · 13 comments
Owner

Originally created by @nutta-git on GitHub (Oct 5, 2023).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6035

Description

Ubisoft connect doesn't work with Lutris's default profile.

Steps to Reproduce

  1. ln -s /usr/bin/firejail /usr/local/bin/lutris
  2. cp /etc/firejail/lutris.profile ~/.config/firejail/lutris.profile (to a whitelist a single folder)
  3. firecfg --fix
  4. Launch Lutris
  5. Start Ubisoft Connect [WINE- Latest Version]

Expected behavior

Ubisoft Connect should work without throwing an error

Actual behavior

Lutris gave an API error[lutris-upc]

Behavior without a profile

  1. rm /usr/local/bin/lutris

Ubisoft Connect starts fine without Firejail profile

Environment

  • Arch Linux x86-64
  • firejail version 0.9.72

Checklist

  • The issues is caused by firejail (i.e. running the program by path (e.g. /usr/bin/vlc) "fixes" it).
  • I can reproduce the issue without custom modifications (e.g. globals.local).
  • The program has a profile. (If not, request one in https://github.com/netblue30/firejail/issues/1139)
  • The profile (and redirect profile if exists) hasn't already been fixed upstream.
  • I have performed a short search for similar issues (to avoid opening a duplicate).
    • I'm aware of browser-allow-drm yes/browser-disable-u2f no in firejail.config to allow DRM/U2F in browsers.
  • I used --profile=PROFILENAME to set the right profile. (Only relevant for AppImages)

Log

Output of LC_ALL=C firejail /path/to/program

Reading profile /home/user/.config/firejail/lutris.profile
Reading profile /etc/firejail/allow-python2.inc
Reading profile /etc/firejail/allow-python3.inc
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-devel.inc
Reading profile /etc/firejail/disable-exec.inc
Reading profile /etc/firejail/disable-interpreters.inc
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/disable-xdg.inc
Reading profile /etc/firejail/whitelist-common.inc
Reading profile /etc/firejail/whitelist-usr-share-common.inc
Reading profile /etc/firejail/whitelist-runuser-common.inc
Reading profile /etc/firejail/whitelist-var-common.inc
Seccomp list in: !modify_ldt, check list: @default-keep, prelist: unknown,
Parent pid 107596, child pid 107600
Warning: An abstract unix socket for session D-BUS might still be available. Use --net or remove unix from --protocol set.
Seccomp list in: !modify_ldt, check list: @default-keep, prelist: unknown,
Seccomp list in: !modify_ldt, check list: @default-keep, prelist: unknown,
Child process initialized in 61.71 ms
Warning: seccomp disabled, it requires a Linux kernel version 3.5 or newer.

(lutris:13): dbind-WARNING **: 17:55:41.010: Couldn't connect to accessibility bus: Failed to connect to socket /run/user/1000/at-spi/bus_0: No such file or directory
2023-10-05 17:55:41,215: Starting Lutris 0.5.13
2023-10-05 17:55:41,216: Running AMD Mesa driver 23.2.0 on AMD Radeon RX 6600 XT (navi23, LLVM 16.0.6, DRM 3.54, 6.5.5-2-cachyos) (0x73ff)
2023-10-05 17:55:41,216: GPU: 8086:4680 1458:D000 (i915 drivers)
2023-10-05 17:55:41,216: GPU: 1002:73FF 1043:05D1 (amdgpu drivers)
2023-10-05 17:55:41,216: i386 libgnutls.so.30 missing (needed by gnutls)
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/lutris/style_manager.py", line 77, in _call_cb
    values = obj.call_finish(result)
             ^^^^^^^^^^^^^^^^^^^^^^^
gi.repository.GLib.GError: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown (2)
2023-10-05 17:55:53,341: Unable to load libGLX_nvidia.so.0
2023-10-05 17:55:53,341: Unable to locate libGLX_nvidia
lutris-wrapper: Ubisoft Connect
Started initial process 258 from /home/user/.local/share/lutris/runners/wine/wine-ge-8-17-x86_64/bin/wine /home/user/Games/ubisoft-connect/drive_c/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/UbisoftConnect.exe
Start monitoring process.
fsync: up and running.
wine: Using setpriority to control niceness in the [-19,19] range
Initial process has exited (return code: 0)
Monitored process exited.
Exit with return code 0
2023-10-05 17:55:57,381: Game still running (state: running)
2023-10-05 17:55:57,381: Stopping Ubisoft Connect (wine)
2023-10-05 17:55:57,382: The game has run for a very short time, did it crash?

Output of LC_ALL=C firejail --debug /path/to/program

Uploaded File: lutris-firejail-debug.txt

lutris-firejail-debug.txt

Originally created by @nutta-git on GitHub (Oct 5, 2023). Original GitHub issue: https://github.com/netblue30/firejail/issues/6035 ### Description Ubisoft connect doesn't work with Lutris's default profile. ### Steps to Reproduce 1) `ln -s /usr/bin/firejail /usr/local/bin/lutris` 2) `cp /etc/firejail/lutris.profile ~/.config/firejail/lutris.profile` (to a whitelist a single folder) 3) `firecfg --fix` 4) Launch Lutris 5) Start [Ubisoft Connect](https://lutris.net/games/ubisoft-connect/) [WINE- Latest Version] ### Expected behavior Ubisoft Connect should work without throwing an error ### Actual behavior Lutris gave an API error[![lutris-upc](https://github.com/netblue30/firejail/assets/59726608/51fd8583-9cc8-4818-8146-f0a0a5d99dc0)] ### Behavior without a profile 1) `rm /usr/local/bin/lutris` Ubisoft Connect starts fine without Firejail profile ### Environment - Arch Linux x86-64 - firejail version 0.9.72 ### Checklist - [x] The issues is caused by firejail (i.e. running the program by path (e.g. `/usr/bin/vlc`) "fixes" it). - [x] I can reproduce the issue without custom modifications (e.g. globals.local). - [x] The program has a profile. (If not, request one in `https://github.com/netblue30/firejail/issues/1139`) - [x] The profile (and redirect profile if exists) hasn't already been fixed [upstream](https://github.com/netblue30/firejail/tree/master/etc). - [x] I have performed a short search for similar issues (to avoid opening a duplicate). - [ ] I'm aware of `browser-allow-drm yes`/`browser-disable-u2f no` in `firejail.config` to allow DRM/U2F in browsers. - [ ] I used `--profile=PROFILENAME` to set the right profile. (Only relevant for AppImages) ### Log <details> <summary>Output of <code>LC_ALL=C firejail /path/to/program</code></summary> <p> ``` Reading profile /home/user/.config/firejail/lutris.profile Reading profile /etc/firejail/allow-python2.inc Reading profile /etc/firejail/allow-python3.inc Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-devel.inc Reading profile /etc/firejail/disable-exec.inc Reading profile /etc/firejail/disable-interpreters.inc Reading profile /etc/firejail/disable-programs.inc Reading profile /etc/firejail/disable-xdg.inc Reading profile /etc/firejail/whitelist-common.inc Reading profile /etc/firejail/whitelist-usr-share-common.inc Reading profile /etc/firejail/whitelist-runuser-common.inc Reading profile /etc/firejail/whitelist-var-common.inc Seccomp list in: !modify_ldt, check list: @default-keep, prelist: unknown, Parent pid 107596, child pid 107600 Warning: An abstract unix socket for session D-BUS might still be available. Use --net or remove unix from --protocol set. Seccomp list in: !modify_ldt, check list: @default-keep, prelist: unknown, Seccomp list in: !modify_ldt, check list: @default-keep, prelist: unknown, Child process initialized in 61.71 ms Warning: seccomp disabled, it requires a Linux kernel version 3.5 or newer. (lutris:13): dbind-WARNING **: 17:55:41.010: Couldn't connect to accessibility bus: Failed to connect to socket /run/user/1000/at-spi/bus_0: No such file or directory 2023-10-05 17:55:41,215: Starting Lutris 0.5.13 2023-10-05 17:55:41,216: Running AMD Mesa driver 23.2.0 on AMD Radeon RX 6600 XT (navi23, LLVM 16.0.6, DRM 3.54, 6.5.5-2-cachyos) (0x73ff) 2023-10-05 17:55:41,216: GPU: 8086:4680 1458:D000 (i915 drivers) 2023-10-05 17:55:41,216: GPU: 1002:73FF 1043:05D1 (amdgpu drivers) 2023-10-05 17:55:41,216: i386 libgnutls.so.30 missing (needed by gnutls) Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/lutris/style_manager.py", line 77, in _call_cb values = obj.call_finish(result) ^^^^^^^^^^^^^^^^^^^^^^^ gi.repository.GLib.GError: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown (2) 2023-10-05 17:55:53,341: Unable to load libGLX_nvidia.so.0 2023-10-05 17:55:53,341: Unable to locate libGLX_nvidia lutris-wrapper: Ubisoft Connect Started initial process 258 from /home/user/.local/share/lutris/runners/wine/wine-ge-8-17-x86_64/bin/wine /home/user/Games/ubisoft-connect/drive_c/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/UbisoftConnect.exe Start monitoring process. fsync: up and running. wine: Using setpriority to control niceness in the [-19,19] range Initial process has exited (return code: 0) Monitored process exited. Exit with return code 0 2023-10-05 17:55:57,381: Game still running (state: running) 2023-10-05 17:55:57,381: Stopping Ubisoft Connect (wine) 2023-10-05 17:55:57,382: The game has run for a very short time, did it crash? ``` </p> </details> <details> <summary>Output of <code>LC_ALL=C firejail --debug /path/to/program</code></summary> <p> <!-- If the output is too long to embed it into the comment, create a secret gist at https://gist.github.com/ and link it here. --> ``` Uploaded File: lutris-firejail-debug.txt ``` </p> </details> [lutris-firejail-debug.txt](https://github.com/netblue30/firejail/files/12824904/lutris-firejail-debug.txt)
Author
Owner

@nutta-git commented on GitHub (Oct 6, 2023):

Setting ignore to seccomp !modify_ldt and seccomp.32 !modify_ldt fixes this issue.

ignore seccomp !modify_ldt
ignore seccomp.32 !modify_ldt

Should I close this issue or keep it open?

<!-- gh-comment-id:1750220093 --> @nutta-git commented on GitHub (Oct 6, 2023): Setting ignore to seccomp !modify_ldt and seccomp.32 !modify_ldt fixes this issue. ``` ignore seccomp !modify_ldt ignore seccomp.32 !modify_ldt ``` Should I close this issue or keep it open?
Author
Owner

@ghost commented on GitHub (Oct 6, 2023):

Should I close this issue or keep it open?

Thank you for reporting. Disabling the seccomp filter like you did might fix your issue, but the lutris sandbox would be more hardened if we could ascertain an improved, working filter. Let's keep this open so people can chime in to try determining such a replacement seccomp filter.

Could you try to find a working seccomp filter? There's more info here.

<!-- gh-comment-id:1750277282 --> @ghost commented on GitHub (Oct 6, 2023): > Should I close this issue or keep it open? Thank you for reporting. Disabling the seccomp filter like you did might fix your issue, but the lutris sandbox would be more hardened if we could ascertain an improved, working filter. Let's keep this open so people can chime in to try determining such a replacement seccomp filter. Could you try to find a working seccomp filter? There's more info [here](https://github.com/netblue30/firejail/blob/master/etc/templates/syscalls.txt).
Author
Owner

@nutta-git commented on GitHub (Oct 6, 2023):

@glitsj16
I don't know much about this to offer any help, I sort of found out by trial and error.
I followed the link your provided, and try to find out which seccomp was causing issues.
When I run:
firejail --seccomp-error-action=log /usr/bin/lutris
Everthing works fine, and journalctl doesn't list anything

When I run :
firejail /usr/bin/lutris
I get original issue

<!-- gh-comment-id:1750317489 --> @nutta-git commented on GitHub (Oct 6, 2023): @glitsj16 I don't know much about this to offer any help, I sort of found out by trial and error. I followed the link your provided, and try to find out which seccomp was causing issues. When I run: `firejail --seccomp-error-action=log /usr/bin/lutris` Everthing works fine, and journalctl doesn't list anything When I run : `firejail /usr/bin/lutris` I get original issue
Author
Owner

@ghost commented on GitHub (Oct 6, 2023):

That's relevant info, thanks!

Anyhing in journalctl when you --seccomp-error-action=EPERM (the default) and --seccomp-log=yes?

<!-- gh-comment-id:1750359683 --> @ghost commented on GitHub (Oct 6, 2023): That's relevant info, thanks! Anyhing in journalctl when you `--seccomp-error-action=EPERM` (the default) and `--seccomp-log=yes`?
Author
Owner

@nutta-git commented on GitHub (Oct 6, 2023):

@glitsj16
firejail --seccomp-error-action=EPERM /usr/bin/lutris
I get the original issue and nothing is shown on [journalctl --grep=SECCOMP --follow]

firejail --seccomp-log=yes /usr/bin/lutris
Console prints out:
Error: invalid --seccomp-log=yes command line option
And nothing happens.

<!-- gh-comment-id:1750406113 --> @nutta-git commented on GitHub (Oct 6, 2023): @glitsj16 `firejail --seccomp-error-action=EPERM /usr/bin/lutris` I get the original issue and nothing is shown on [journalctl --grep=SECCOMP --follow] `firejail --seccomp-log=yes /usr/bin/lutris` Console prints out: `Error: invalid --seccomp-log=yes command line option` And nothing happens.
Author
Owner

@ghost commented on GitHub (Oct 6, 2023):

@nutta-git
Argh, my bad. You'll need to change the default # seccomp-log no to seccomp-log yes in /etc/firejail/firejail.config... Apologies for the confusion.

<!-- gh-comment-id:1750435204 --> @ghost commented on GitHub (Oct 6, 2023): @nutta-git Argh, my bad. You'll need to change the default `# seccomp-log no` to `seccomp-log yes` in /etc/firejail/firejail.config... Apologies for the confusion.
Author
Owner

@nutta-git commented on GitHub (Oct 6, 2023):

@glitsj16
No worries, I edited firejail.config, rebooted and tried again.
Term1) sudo journalctl --grep=SECCOMP --follow

Term2) firejail --seccomp-error-action=EPERM /usr/bin/lutris

Original Issue and nothing was listed on journalctl

I tried: firejail --seccomp-error-action=log /usr/bin/lutris again

And it seems to work fine, but nothing is being listed in journalctl

<!-- gh-comment-id:1750464023 --> @nutta-git commented on GitHub (Oct 6, 2023): @glitsj16 No worries, I edited firejail.config, rebooted and tried again. Term1) `sudo journalctl --grep=SECCOMP --follow` Term2) `firejail --seccomp-error-action=EPERM /usr/bin/lutris` Original Issue and nothing was listed on journalctl I tried: `firejail --seccomp-error-action=log /usr/bin/lutris` again And it seems to work fine, but nothing is being listed in journalctl
Author
Owner

@nutta-git commented on GitHub (Oct 6, 2023):

I don't mean to impose, but can you try to reproduce the issue by following the steps found in the First Post.
I feel like this a problem is unique to me. If its not reproducible, then we can close this issue.

<!-- gh-comment-id:1750483392 --> @nutta-git commented on GitHub (Oct 6, 2023): I don't mean to impose, but can you try to reproduce the issue by following the steps found in the First Post. I feel like this a problem is unique to me. If its not reproducible, then we can close this issue.
Author
Owner

@ghost commented on GitHub (Oct 6, 2023):

No problem. I'll try to reproduce over the weekend, although my hardware isn't any good for gaming & wine. We can keep this open for a while. Other collaborators/users might have input.

<!-- gh-comment-id:1750562175 --> @ghost commented on GitHub (Oct 6, 2023): No problem. I'll try to reproduce over the weekend, although my hardware isn't any good for gaming & wine. We can keep this open for a while. Other collaborators/users might have input.
Author
Owner

@rusty-snake commented on GitHub (Oct 7, 2023):

Tried allow-debuggers?

<!-- gh-comment-id:1751678897 --> @rusty-snake commented on GitHub (Oct 7, 2023): Tried allow-debuggers?
Author
Owner

@nutta-git commented on GitHub (Oct 8, 2023):

@rusty-snake
I un-commented allow-debuggers in .config/firejail/lutris.profile
Also have; seccomp-log yes in /etc/firejail/firejail.config

Then I re-ran the test.

Term1) sudo journalctl --grep=SECCOMP --follow

Term2) firejail --seccomp-error-action=EPERM /usr/bin/lutris

Now I no longer get the original issue, nothing is listed in journalctl

I tried: firejail --seccomp-error-action=log /usr/bin/lutris

Same result as the first command, no issue and no journalctl log

<!-- gh-comment-id:1751873229 --> @nutta-git commented on GitHub (Oct 8, 2023): @rusty-snake I un-commented allow-debuggers in `.config/firejail/lutris.profile ` Also have; seccomp-log yes in `/etc/firejail/firejail.config` Then I re-ran the test. Term1) `sudo journalctl --grep=SECCOMP --follow` Term2) `firejail --seccomp-error-action=EPERM /usr/bin/lutris` Now I no longer get the original issue, nothing is listed in journalctl I tried: `firejail --seccomp-error-action=log /usr/bin/lutris` Same result as the first command, no issue and no journalctl log
Author
Owner

@nutta-git commented on GitHub (Oct 24, 2023):

I think I found the right syscalls for this issue: ptrace,clone3 (and optionally) process_vm_readv.

I had journalctl -f | grep "kernel" running, looking for syscalls lutris was using
I need to whitelist just ptrace and clone3, journalctl did list for process_vm_ready when a game was running, but it didn't crash the game.

seccomp !modify_ldt,!clone3,!ptrace,!process_vm_readv
seccomp.32 !modify_ldt

<!-- gh-comment-id:1776513877 --> @nutta-git commented on GitHub (Oct 24, 2023): I think I found the right syscalls for this issue: ptrace,clone3 (and optionally) process_vm_readv. I had `journalctl -f | grep "kernel"` running, looking for syscalls lutris was using I need to whitelist just `ptrace` and `clone3`, journalctl did list for `process_vm_ready` when a game was running, but it didn't crash the game. `seccomp !modify_ldt,!clone3,!ptrace,!process_vm_readv` `seccomp.32 !modify_ldt`
Author
Owner

@ghost commented on GitHub (Oct 24, 2023):

Nice finds! Please consider opening a PR.

<!-- gh-comment-id:1777998960 --> @ghost commented on GitHub (Oct 24, 2023): Nice finds! Please consider opening a PR.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#3164
No description provided.