fix(linux): detect stale SELinux labels after game updates - #34
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add an SELinux preflight to the Linux launcher so stale host-executable
labels are detected before UE4SS installs executable-memory trampolines.
Game updates can replace the host executable with a new inode. The
replacement can inherit the directory's default SELinux type instead of the
persistent UE4SS entrypoint type. When this prevents transition into the
scoped UE4SS domain, SELinux can deny
execheap, leaving a generatedPolyHook trampoline non-executable and causing a delayed
SIGSEGV.Changes
UE4SS_SELINUX_PREFLIGHTmodes:offwarn— defaultstrictUE4SS_EXPECTED_SELINUX_TYPEfor scoped deployments.user_home_t.rejection, and a matching expected type.
semanage fcontextmappings.restoreconafter game updates or validation.execheapboolean andchconare unsuitable.Incident validation
Observed after Palworld Dedicated Server updated to:
1.0.2.100933d16b4d840a30dc3f467fe1059a0088ddb08a4b513cc45150767cba1785867d30The loader initialized normally and resolved its required signatures, but
faulted when entering the generated EngineTick trampoline.
The audit log showed:
The updated executable had reverted to
user_home_t. Restoring thepersistent
palworld_ue4ss_exec_tlabel caused the process to transitioninto
palworld_ue4ss_t.After relabeling:
Event loop start.Running Palworld dedicated server on :8212.Validation
LinuxLauncherTests: PASSPalworldSignatureTestsskipped because no fixture was suppliedexecheapdenials underunconfined_t.Commits
131ca2b2— fix(linux): detect stale SELinux host labels976af59c— docs(linux): restore host labels after game updates