[PR #6216] [MERGED] profiles: multimc: fix instances not running & harden #5877

Closed
opened 2026-05-05 10:46:36 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/6216
Author: @powerjungle
Created: 2/19/2024
Status: Merged
Merged: 2/29/2024
Merged by: @netblue30

Base: masterHead: master


📝 Commits (1)

  • 1a2e8ab multimc: instances not running, because of missing permissions

📊 Changes

1 file changed (+11 additions, -0 deletions)

View changed files

📝 etc/profile-m-z/multimc5.profile (+11 -0)

📄 Description

When starting an instance, in the logs, a failed attempt to load the lwjgl library is shown and the game doesn't run.
The library is in the /tmp directory. The reason for this appears to be, in the lwjgl source code, the shared library loading function, extracts in the temporary directory and continues from there. This is fixed by whitelisting.

The reason for adding "ignore noexec /tmp" as well, is that without it, the game can't run, even if the directory is whitelisted. It seems the library needs to be loaded from /tmp.

A second error for a failed attempt to access /home/user/.cache/JNA is also shown in the logs. This is also fixed by whitelisting.

The errors which inspired the commit:

Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: /home/user/.cache/JNA/temp/jna205883382989158645.tmp: /home/user/.cache/JNA/temp/jna205883382989158645.tmp: failed to map segment from shared object [in thread "main"]
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: /tmp/lwjgl_user/3.3.2+13/x64/liblwjgl.so: /tmp/lwjgl_user/3.3.2+13/x64/liblwjgl.so: failed to map segment from shared object [in thread "Render thread"]

Links to the source code that should be responsible for the /tmp error:

56d09c39ff/modules/lwjgl/core/src/main/java/org/lwjgl/system/SharedLibraryLoader.java (L51)

56d09c39ff/modules/lwjgl/core/src/main/java/org/lwjgl/system/SharedLibraryLoader.java (L137)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netblue30/firejail/pull/6216 **Author:** [@powerjungle](https://github.com/powerjungle) **Created:** 2/19/2024 **Status:** ✅ Merged **Merged:** 2/29/2024 **Merged by:** [@netblue30](https://github.com/netblue30) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`1a2e8ab`](https://github.com/netblue30/firejail/commit/1a2e8ab852dce3dcfa3ad39dc009613ce6ffe53f) multimc: instances not running, because of missing permissions ### 📊 Changes **1 file changed** (+11 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `etc/profile-m-z/multimc5.profile` (+11 -0) </details> ### 📄 Description When starting an instance, in the logs, a failed attempt to load the lwjgl library is shown and the game doesn't run. The library is in the /tmp directory. The reason for this appears to be, in the lwjgl source code, the shared library loading function, extracts in the temporary directory and continues from there. This is fixed by whitelisting. The reason for adding "ignore noexec /tmp" as well, is that without it, the game can't run, even if the directory is whitelisted. It seems the library needs to be loaded from /tmp. A second error for a failed attempt to access /home/user/.cache/JNA is also shown in the logs. This is also fixed by whitelisting. The errors which inspired the commit: ``` Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: /home/user/.cache/JNA/temp/jna205883382989158645.tmp: /home/user/.cache/JNA/temp/jna205883382989158645.tmp: failed to map segment from shared object [in thread "main"] Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: /tmp/lwjgl_user/3.3.2+13/x64/liblwjgl.so: /tmp/lwjgl_user/3.3.2+13/x64/liblwjgl.so: failed to map segment from shared object [in thread "Render thread"] ``` Links to the source code that should be responsible for the /tmp error: https://github.com/LWJGL/lwjgl3/blob/56d09c39ff26ad49c74f6be6884d60ef3f597384/modules/lwjgl/core/src/main/java/org/lwjgl/system/SharedLibraryLoader.java#L51 https://github.com/LWJGL/lwjgl3/blob/56d09c39ff26ad49c74f6be6884d60ef3f597384/modules/lwjgl/core/src/main/java/org/lwjgl/system/SharedLibraryLoader.java#L137 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 10:46:36 -06:00
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#5877
No description provided.