Skip to content

[release/1.7] Update AppArmor template to better support rootlesskit#10116

Merged
dmcgowan merged 1 commit intocontainerd:release/1.7from
AkihiroSuda:cherrypick-10111-1.7
Apr 23, 2024
Merged

[release/1.7] Update AppArmor template to better support rootlesskit#10116
dmcgowan merged 1 commit intocontainerd:release/1.7from
AkihiroSuda:cherrypick-10111-1.7

Conversation

@AkihiroSuda
Copy link
Copy Markdown
Member

Fix containerd/nerdctl issue 2730
> [Rootless] `nerdctl rm` fails when AppArmor is loaded:
> `error="unknown error after kill: runc did not terminate successfully: exit status 1:
> unable to signal init: permission denied\n: unknown"`

Caused by:
> kernel: audit: type=1400 audit(1713840662.766:122): apparmor="DENIED" operation="signal" class="signal"
> profile="nerdctl-default" pid=366783 comm="runc" requested_mask="receive" denied_mask="receive" signal=kill
> peer="/usr/local/bin/rootlesskit"

The issue is known to happen on Ubuntu 23.10 and 24.04 LTS.
Doesn't seem to happen on Ubuntu 22.04 LTS.

Signed-off-by: Akihiro Suda <[email protected]>
(cherry picked from commit eb5a0c0)
Signed-off-by: Akihiro Suda <[email protected]>
@thaJeztah
Copy link
Copy Markdown
Member

Is this needed for 1.6 as well, or only 1.7?

Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

@AkihiroSuda
Copy link
Copy Markdown
Member Author

Is this needed for 1.6 as well, or only 1.7?

For nerdctl this is only needed for 1.7 regardless to the daemon version, as nerdctl imports containerd 1.7 as the library for generating the nerdctl-default AppArmor profile.

@thaJeztah
Copy link
Copy Markdown
Member

Ah, didn't consider that it was for library code! Yeah, maybe not needed

@dmcgowan dmcgowan merged commit e412ca7 into containerd:release/1.7 Apr 23, 2024
@dmcgowan dmcgowan changed the title [release/1.7] apparmor: add signal (receive) peer=/usr/local/bin/rootlesskit, [release/1.7] Add signal (receive) peer=/usr/local/bin/rootlesskit, to AppArmor template Apr 24, 2024
@dmcgowan dmcgowan changed the title [release/1.7] Add signal (receive) peer=/usr/local/bin/rootlesskit, to AppArmor template [release/1.7] Update AppArmor template to better support rootlesskit Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants