-
Notifications
You must be signed in to change notification settings - Fork 110
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
fix apparmor profile for spod #2696
Conversation
Hi @mhils. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2696 +/- ##
==========================================
- Coverage 45.50% 40.91% -4.59%
==========================================
Files 79 109 +30
Lines 7782 18724 +10942
==========================================
+ Hits 3541 7661 +4120
- Misses 4099 10546 +6447
- Partials 142 517 +375 |
/ok-to-test |
The ptrace stuff is requried in addition to #2691. Did we find out what introduced the ptrace thingy? I think was not required before. |
@mhils this one needs a rebase. |
the template injection hack is not meant to be a permanent solution, but a temporary stopgap to make things work without reverts
a274eca
to
7099590
Compare
Based on https://gitlab.com/apparmor/apparmor/-/wikis/TechnicalDoc_Proc_and_ptrace#list-of-proc-files-that-may-cause-ptrace-trace-requests, AppArmor wants ptrace permissions if /proc/1/ns is read by go-apparmor here: https://github.com/pjbgf/go-apparmor/blob/1375e5e7aa892edd0ad2a1cebef2297ac2e3872d/pkg/hostop/mount_linux.go#L86. So my explanation for why this did not show up before is that the previous cluster where we recorded the profile did not have apparmor recording enabled. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ccojocar, mhils, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR fixes the apparmor profile for the bpf recorder itself so that recording works again after #2646. The template injection hack is not meant to be a permanent solution, but a temporary stopgap to make things work without reverts.
Most of the missing permissions were found looking at
journalctl
, but for/
AppArmor did not emit any DENIED messages despite actually denying permissions. This is a bit worrying in general, but what to do.Which issue(s) this PR fixes:
None
Does this PR have test?
N/A
Special notes for your reviewer:
Does this PR introduce a user-facing change?