Supplementary groups are not set up properly in github.com/containerd/containerd

説明

Impact

A bug was found in containerd where supplementary groups are not set up properly inside a container. If an attacker has direct access to a container and manipulates their supplementary group access, they may be able to use supplementary group access to bypass primary group restrictions in some cases, potentially gaining access to sensitive information or gaining the ability to execute code in that container.

Downstream applications that use the containerd client library may be affected as well.

Patches

This bug has been fixed in containerd v1.6.18 and v.1.5.18. Users should update to these versions and recreate containers to resolve this issue. Users who rely on a downstream application that uses containerd's client library should check that application for a separate advisory and instructions.

Workarounds

Ensure that the "USER $USERNAME" Dockerfile instruction is not used. Instead, set the container entrypoint to a value similar to ENTRYPOINT ["su", "-", "user"] to allow su to properly set up supplementary groups.

References

  • https://www.benthamsgaze.org/2022/08/22/vulnerability-in-linux-containers-investigation-and-mitigation/
  • Docker/Moby: CVE-2022-36109, fixed in Docker 20.10.18
  • CRI-O: CVE-2022-2995, fixed in CRI-O 1.25.0
  • Podman: CVE-2022-2989, fixed in Podman 3.0.1 and 4.2.0
  • Buildah: CVE-2022-2990, fixed in Buildah 1.27.1

Note that CVE IDs apply to a particular implementation, even if an issue is common.

For more information

If you have any questions or comments about this advisory:

To report a security issue in containerd:
* Report a new vulnerability
* Email us at [email protected]

基本情報

タイプ
reviewed
深刻度
medium
GitHub 上のアドバイザリ
アドバイザリを開く ↗
リポジトリのアドバイザリ
リポジトリのアドバイザリを開く ↗
ソースコード
ソースを見る ↗
公開(アドバイザリ)
2023-02-16 14:11:33 UTC
更新
2024-09-06 21:37:05 UTC
GitHub レビュー済み
2023-02-16 14:11:33 UTC
NVD で公開
2023-02-16

EPSS Score

Score Percentile
0.03% 6.69%

CVSS Scores

Base score Version Severity Vector
5.3 3.0
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L クリックして展開
攻撃ベクター (AV:L)
対象ホスト上でコードを実行できること、または別ユーザーの誤操作・悪意ある操作が前提になる。
攻撃の複雑さ (AC:L)
攻撃者が条件を満たせば、レース条件や珍しい構成に依存せずに再現しやすい。
必要な権限 (PR:L)
一般ユーザー権限があれば足り、管理者(root 相当)は不要。
ユーザーの関与 (UI:N)
メールのリンクを開く、マクロを有効にするなど、被害者の協力がなくても成立しうる。
スコープ (S:U)
影響は脆弱コンポーネントと同一のセキュリティ権限・信頼境界の内側に収まる。
機密性への影響 (C:L)
一部のデータや属性が漏えいしうるが、全件一括流出といった規模には至らない。
完全性への影響 (I:L)
レコードの一部書き換えや設定の歪みなど、限定的だが検知・復旧が必要な水準。
可用性への影響 (A:L)
遅延や一部機能の停止、断続的な障害など、運用で吸収しうる範囲。

Identifiers

CWEs

CWE id Name
CWE-269 Improper Privilege Management
CWE-863 Incorrect Authorization

Affected packages (2)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
go github.com/containerd/containerd >= 1.6.0, < 1.6.18 1.6.18
go github.com/containerd/containerd < 1.5.18 1.5.18

References

cvelogic Threat Intelligence