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

Allow sssd_selinux_manager_t the setcap process permission #2469

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

zpytela
Copy link
Contributor

@zpytela zpytela commented Dec 10, 2024

SSSD is being reworked [1] to not rely on effective capabilities but to raise a permitted capability when needed, and drop it completely when not needed anymore.
[1] SSSD/sssd#7731

The commit addresses the following AVC denial:
type=AVC msg=audit(1733309927.245:4711): avc: denied { setcap } for pid=43967 comm="selinux_child" scontext=system_u:system_r:sssd_selinux_manager_t:s0 tcontext=system_u:system_r:sssd_selinux_manager_t:s0 tclass=process permissive=1 type=SYSCALL msg=audit(1733309927.245:4711): arch=c000003e syscall=126 success=yes exit=0 a0=55795759750c a1=557957597514 a2=557957597514 a3=80 items=0 ppid=41662 pid=43967 auid=4294967295 uid=990 gid=986 euid=990 suid=990 fsuid=990 egid=986 sgid=986 fsgid=986 tty=(none) ses=4294967295 comm="selinux_child" exe="/usr/libexec/sssd/selinux_child" subj=system_u:system_r:sssd_selinux_manager_t:s0 key=(null)ARCH=x86_64 SYSCALL=capset AUID="unset" UID="sssd" GID="sssd" EUID="sssd" SUID="sssd" FSUID="sssd" EGID="sssd" SGID="sssd" FSGID="sssd" type=CAPSET msg=audit(1733309927.245:4711): pid=43967 cap_pi=0000000000000080 cap_pp=00000000000000c0 cap_pe=0000000000000080 cap_pa=0

Resolves: #2455
Resolves: rhbz#2331486

@zpytela zpytela force-pushed the sssdlinuxmanager--setcap branch from 3b46ae7 to c0f8050 Compare December 10, 2024 19:45
@zpytela
Copy link
Contributor Author

zpytela commented Dec 10, 2024

Thanks for spotting this. Just an effect of senseless haste.

SSSD is being reworked [1] to not rely on effective capabilities but to
raise a permitted capability when needed, and drop it completely when
not needed anymore.
[1] SSSD/sssd#7731

The commit addresses the following AVC denial:
type=AVC msg=audit(1733309927.245:4711): avc: denied { setcap } for pid=43967 comm="selinux_child" scontext=system_u:system_r:sssd_selinux_manager_t:s0 tcontext=system_u:system_r:sssd_selinux_manager_t:s0 tclass=process permissive=1
type=SYSCALL msg=audit(1733309927.245:4711): arch=c000003e syscall=126 success=yes exit=0 a0=55795759750c a1=557957597514 a2=557957597514 a3=80 items=0 ppid=41662 pid=43967 auid=4294967295 uid=990 gid=986 euid=990 suid=990 fsuid=990 egid=986 sgid=986 fsgid=986 tty=(none) ses=4294967295 comm="selinux_child" exe="/usr/libexec/sssd/selinux_child" subj=system_u:system_r:sssd_selinux_manager_t:s0 key=(null)ARCH=x86_64 SYSCALL=capset AUID="unset" UID="sssd" GID="sssd" EUID="sssd" SUID="sssd" FSUID="sssd" EGID="sssd" SGID="sssd" FSGID="sssd"
type=CAPSET msg=audit(1733309927.245:4711): pid=43967 cap_pi=0000000000000080 cap_pp=00000000000000c0 cap_pe=0000000000000080 cap_pa=0

Resolves: fedora-selinux#2455
Resolves: rhbz#2331486
@zpytela zpytela force-pushed the sssdlinuxmanager--setcap branch from c0f8050 to 2135024 Compare December 10, 2024 19:47
@alexey-tikhonov
Copy link

@zpytela, fedora-41 build failed with No match for argument: checkpolicy >= 3.8. Is this expected?

I have a f-41 test env at hand, so could give a build a try.

@zpytela
Copy link
Contributor Author

zpytela commented Dec 11, 2024

@alexey-tikhonov F41 and F42 policies are the same, but packages require different settings, github actions need to be fixed

@alexey-tikhonov
Copy link

Well, when I run audit2allow I get the same output as in this patch.

@alexey-tikhonov
Copy link

alexey-tikhonov commented Dec 11, 2024

Well, when I run audit2allow I get the same output as in this patch.

I tried manually and, of course, this works.

@zpytela, it would be great to get this to F41/Rawhide/C10S :)

@zpytela
Copy link
Contributor Author

zpytela commented Dec 11, 2024

It will be in the next build this week.

@zpytela zpytela merged commit baad3fa into fedora-selinux:rawhide Dec 11, 2024
3 of 4 checks passed
@zpytela zpytela deleted the sssdlinuxmanager--setcap branch December 11, 2024 12:31
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.

Allow setcap() syscall for 'sssd_selinux_manager_t'
2 participants