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

selinux: update #917

Merged
merged 22 commits into from
Sep 20, 2023
Merged

selinux: update #917

merged 22 commits into from
Sep 20, 2023

Conversation

tormath1
Copy link
Contributor

@tormath1 tormath1 commented Jun 14, 2023

This PR is a follow-up of flatcar-archive/portage-stable#339 and flatcar-archive/coreos-overlay#1993 - the idea is to "only" upgrade SELinux related software and to pull the new "selinux-container" policy, relabeling investigation could be done in a second time: at least, let's try to get the foundation.

The main change is a transition from virt to container policy (which solves some issues) while I did not want to fix all the SELinux AVC in this PR, I just patched the container policy to get Cilium working out of the box (because now, even in permissive mode, it was failing)

While it closes a certain number of issues, there is still some investigation to do on the others but from a first look it's just a matter of upstreaming some policies (example: SELinuxProject/refpolicy#621)

Closes: flatcar/Flatcar#479, flatcar/Flatcar#891, flatcar/Flatcar#696

Tested in the CI with: flatcar/mantle#344

NOTE: All the kernel_t related patches have to be DROPPED once we support a fully labelled system.

@tormath1 tormath1 self-assigned this Jun 14, 2023
@tormath1 tormath1 temporarily deployed to development June 14, 2023 08:17 — with GitHub Actions Inactive
@tormath1 tormath1 force-pushed the tormath1/selinux-policy-update branch from 8aa40b9 to ba26ce5 Compare June 14, 2023 08:49
@tormath1 tormath1 temporarily deployed to development June 14, 2023 08:49 — with GitHub Actions Inactive
@tormath1 tormath1 temporarily deployed to development June 14, 2023 12:40 — with GitHub Actions Inactive
@tormath1 tormath1 force-pushed the tormath1/selinux-policy-update branch from 6d6cbe2 to 0cec227 Compare June 14, 2023 15:07
@tormath1 tormath1 temporarily deployed to development June 14, 2023 15:08 — with GitHub Actions Inactive
@tormath1 tormath1 force-pushed the tormath1/selinux-policy-update branch from 0cec227 to eee524d Compare June 15, 2023 09:17
@tormath1 tormath1 temporarily deployed to development June 15, 2023 09:17 — with GitHub Actions Inactive
@tormath1 tormath1 temporarily deployed to development June 15, 2023 12:26 — with GitHub Actions Inactive
@tormath1 tormath1 temporarily deployed to development June 15, 2023 15:46 — with GitHub Actions Inactive
@tormath1 tormath1 temporarily deployed to development June 15, 2023 15:50 — with GitHub Actions Inactive
@tormath1 tormath1 force-pushed the tormath1/selinux-policy-update branch from eee524d to 5f4879d Compare June 16, 2023 15:01
@tormath1 tormath1 temporarily deployed to development June 16, 2023 15:01 — with GitHub Actions Inactive
@tormath1 tormath1 force-pushed the tormath1/selinux-policy-update branch from 5f4879d to 806db4b Compare June 19, 2023 09:42
@tormath1 tormath1 temporarily deployed to development June 19, 2023 09:42 — with GitHub Actions Inactive
@tormath1 tormath1 force-pushed the tormath1/selinux-policy-update branch from 806db4b to b3edcfc Compare June 19, 2023 16:40
@tormath1 tormath1 temporarily deployed to development June 19, 2023 16:40 — with GitHub Actions Inactive
@github-actions
Copy link

github-actions bot commented Jun 19, 2023

@tormath1 tormath1 force-pushed the tormath1/selinux-policy-update branch from b3edcfc to f5c72f3 Compare June 20, 2023 08:30
@tormath1 tormath1 temporarily deployed to development June 20, 2023 08:54 — with GitHub Actions Inactive
@tormath1 tormath1 force-pushed the tormath1/selinux-policy-update branch from d2bc91e to 2f10b2a Compare June 20, 2023 13:24
@tormath1 tormath1 temporarily deployed to development June 20, 2023 13:24 — with GitHub Actions Inactive
@tormath1 tormath1 force-pushed the tormath1/selinux-policy-update branch from 2f10b2a to 8a6b967 Compare June 20, 2023 18:43
@tormath1 tormath1 temporarily deployed to development June 20, 2023 18:43 — with GitHub Actions Inactive
@tormath1 tormath1 force-pushed the tormath1/selinux-policy-update branch from 8a6b967 to 60b8d04 Compare June 21, 2023 07:51
@tormath1 tormath1 marked this pull request as ready for review June 21, 2023 07:54
@tormath1 tormath1 requested a review from a team June 21, 2023 07:54
Commit-Ref: gentoo/gentoo@ea4cd1f
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Commit-Ref: gentoo/gentoo@a67229c

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Commit-Ref: gentoo/gentoo@ea4cd1f
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Commit-Ref: gentoo/gentoo@ea4cd1f
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
* remove python dependencies
* move selinux policy directory from /etc/selinux/policy to /usr/lib/selinux/policy
* add tmpfiles to recreate /var/lib/selinux on rootfs
* remove setools dependency

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Commit-Ref: gentoo/gentoo@ea4cd1f
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
* remove python dependencies
* added back multilib_src_install function (qa_check does fail otherwise)
* setting SHLIBDIR for installation

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Commit-Ref: gentoo/gentoo@ea4cd1f
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Commit-Ref: gentoo/gentoo@ea4cd1f
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
* add selinux patches (icmp-bind, relabel and kernel permissions)
* ship our own config file

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Commit-Ref: gentoo/gentoo@ea4cd1f
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
it's now replaced by selinux-container

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
it comes in replacement of selinux-virt

Commit-Ref: gentoo/gentoo@ea4cd1f
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
apply Flatcar patch (including the kernel_t transition that
should be removed once we have a system labelled)

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Commit-Ref: gentoo/gentoo@ea4cd1f
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Commit-Ref: gentoo/gentoo@ea4cd1f
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
it's a dependency from ssh module:
```
Failed to resolve typeattributeset statement at /var/lib/selinux/mcs/tmp/modules/400/ssh/cil:127
Failed to resolve AST
```

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Commit-Ref: gentoo/gentoo@a8d9347

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
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.

[RFE] new package: sec-policy/selinux-container
2 participants