Skip to content

(master) selinux: remap security classes on policyload#2247

Merged
metux merged 1 commit intomasterfrom
pr/selinux-remap-security-classes-on-policyload-_2026-04-18_19-40-35
Apr 21, 2026
Merged

(master) selinux: remap security classes on policyload#2247
metux merged 1 commit intomasterfrom
pr/selinux-remap-security-classes-on-policyload-_2026-04-18_19-40-35

Conversation

@metux
Copy link
Copy Markdown
Contributor

@metux metux commented Apr 18, 2026

Re-map the SELinux security classes on policy loads, as the mapping will
be desynchronized (see man:selinux_set_mapping(3)) and audit messages
will not show the actual class and permission names:

USER_AVC pid=24283 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:xorg_t:s0 msg='avc:  denied  { 0x10 } for request=XFIXES:SelectSelectionInput comm=/usr/bin/python3 resid=6400001 restype=WINDOW scontext=xuser_u:xuser_r:systemd_user_instance_generic_bin_t:s0 tcontext=xuser_u:object_r:xorg_t:s0 tclass=(null) permissive=1

In addition use type-safe assignments.

Signed-off-by: Christian Göttsche cgzones@googlemail.com
Part-of: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/801

@metux metux self-assigned this Apr 18, 2026
@metux metux requested a review from a team April 18, 2026 17:40
Re-map the SELinux security classes on policy loads, as the mapping will
be desynchronized (see man:selinux_set_mapping(3)) and audit messages
will not show the actual class and permission names:

    USER_AVC pid=24283 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:xorg_t:s0 msg='avc:  denied  { 0x10 } for request=XFIXES:SelectSelectionInput comm=/usr/bin/python3 resid=6400001 restype=WINDOW scontext=xuser_u:xuser_r:systemd_user_instance_generic_bin_t:s0 tcontext=xuser_u:object_r:xorg_t:s0 tclass=(null) permissive=1

In addition use type-safe assignments.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/801>
metux pushed a commit that referenced this pull request Apr 18, 2026
metux pushed a commit that referenced this pull request Apr 19, 2026
metux pushed a commit that referenced this pull request Apr 21, 2026
@metux metux merged commit f356b37 into master Apr 21, 2026
@metux metux deleted the pr/selinux-remap-security-classes-on-policyload-_2026-04-18_19-40-35 branch April 21, 2026 08:42
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

Successfully merging this pull request may close these issues.

2 participants