contrib/apparmor: profile name goes into peer rules as a pattern
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by reading the default AppArmor template and the Go apparmor.WithDefaultProfile option mentioned in the issue; trace how the caller-supplied profile name reaches peer= rules. Check how AppArmor handles pattern characters and whether the name should be validated or escaped. Done means a profile name cannot broaden peer access, with a regression test covering a glob character.
索引モデルが issue の本文から書いたものです。
説明
Description
The default AppArmor template puts the profile name into its peer= rules as is. AppArmor reads that value as a pattern, so a name with a glob character allows signal and ptrace to more peers than the profile itself.
CRI is not affected, it always passes the constant cri-containerd.apparmor.d. The name is caller-supplied in two places: ctr run --apparmor-default-profile <name> and any Go caller of apparmor.WithDefaultProfile.
Steps to reproduce the issue
I did not run this through ctr. The profiles below are hand-written and copy the signal rule from the template.
-
Load three profiles:
profile stktest-exact flags=(attach_disconnected) { file, capability, signal (send,receive) peer=stktest-exact, } profile stktest* flags=(attach_disconnected) { file, capability, signal (send,receive) peer=stktest*, } profile stktest-other flags=(attach_disconnected) { file, capability, signal, } -
Start a process under the third one:
aa-exec -p stktest-other -- sleep 15 -
Signal it from each of the other two:
aa-exec -p <profile> -- kill -0 <pid>
Describe the results you received and expected
| sender profile | signal to stktest-other |
|---|---|
stktest-exact |
denied |
stktest* |
allowed |
I expected both to be denied: a profile generated from the template should only reach peers that carry its own name.
What version of containerd are you using?
No containerd binary was involved. I read the template on main at 9f3f084b43b2.
Any other relevant information
Ubuntu 26.04, kernel 7.0.0-44-generic, AppArmor parser 5.0.2.
Impact is low: the default names are fixed, and an operator has to pick such a name on purpose. Still, loadData could reject names with pattern characters, or escape them. I can send a PR for either.
Show configuration if it is related to CRI plugin.
Not related to CRI.
- 主要言語
- Go
- スター
- 21.6k
- フォーク
- 4.2k
- 平均マージ
- 2日 9時間
- マージ済み PR(30日)
- 86
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
containerd/containerd のほかの issue
-
CRI attach: wiring stdin before stdout drops initial output対応中かも @YiD11 が 36 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
containerd/containerd#14476 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
should it be `size-offset` in line 301 (`core/content/helpers.go`, `seekReader()`)対応中かも @AdamMagued が 34 日前に担当しました。 オープンkind/bug status/more-info-needed
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
containerd/containerd#14278 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
CRI: PullImage hangs forever when image_pull_progress_timeout = "0s" (default transfer service path)対応中かも @refleeexzz が 79 日前に担当しました。 オープンkind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
containerd/containerd#14158 · コメント 8 件 ·
メンテナーはふだん 1 日以内に返信
-
docs: 'allows to split' grammar in containerd-config.toml man page対応中かも @mrchatam が 81 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
containerd/containerd#14154 ·
メンテナーはふだん 1 日以内に返信
-
`RemoveVolatileOption` cannot recognize mount type "fuse.nydus-overlayfs" from nydus-snapshotter再び着手できるかも @ekalinin が 109 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンarea/snapshotters kind/feature
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
containerd/containerd#13573 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
containerd/containerd の issue をすべて見る
似ている issue
-
P3 tech debt
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
kind/feature needs-triage priority/unprioritized
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
NVIDIA/k8s-test-infra#1504 ·
メンテナーはふだん 1 日以内に返信
-
Area/Infrastructure Aspect/Infra Resources Type/Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
wso2/agent-manager#2717 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
open-policy-agent/opa#9685 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信