【问题标题】:Fix vulnerabilities for Azure ACR修复 Azure ACR 的漏洞
【发布时间】:2020-11-14 10:16:39
【问题描述】:

有人可以建议如何修复 Klar 使用 Clair 扫描仪为我的 Azure ACR 映像发现的漏洞。我对使用容器还是很陌生。

这是来自 Klar 的结果示例

Found in: apparmor [2.10.95-0ubuntu2.11]
Fixed By: 
In all versions of AppArmor mount rules are accidentally widened when compiled.
http://people.ubuntu.com/~ubuntu-security/cve/CVE-2016-1585
-----------------------------------------
CVE-2020-3810: [Medium] 
Found in: apt [1.2.32]
Fixed By: 1.2.32ubuntu0.1
Missing input validation in the ar/tar implementations of APT before version 2.1.2 could result in denial of service when processing specially crafted deb files.
http://people.ubuntu.com/~ubuntu-security/cve/CVE-2020-3810
-----------------------------------------
CVE-2018-11237: [Medium] 
Found in: glibc [2.23-0ubuntu11]
Fixed By: 2.23-0ubuntu11.2
An AVX-512-optimized implementation of the mempcpy function in the GNU C Library (aka glibc or libc6) 2.27 and earlier may write data beyond the target buffer, leading to a buffer overflow in __mempcpy_avx512_no_vzeroupper.
http://people.ubuntu.com/~ubuntu-security/cve/CVE-2018-11237
-----------------------------------------
CVE-2018-6485: [Medium] 
Found in: glibc [2.23-0ubuntu11]
Fixed By: 2.23-0ubuntu11.2
An integer overflow in the implementation of the posix_memalign in memalign functions in the GNU C Library (aka glibc or libc6) 2.26 and earlier could cause these functions to return a pointer to a heap area that is too small, potentially leading to heap corruption.
http://people.ubuntu.com/~ubuntu-security/cve/CVE-2018-6485
-----------------------------------------
CVE-2017-18269: [Medium] 
Found in: glibc [2.23-0ubuntu11]
Fixed By: 2.23-0ubuntu11.2
An SSE2-optimized memmove implementation for i386 in sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S in the GNU C Library (aka glibc or libc6) 2.21 through 2.27 does not correctly perform the overlapping memory check if the source memory range spans the middle of the address space, resulting in corrupt data being produced by the copy operation. This may disclose information to context-dependent attackers, or result in a denial of service, or, possibly, code execution.
http://people.ubuntu.com/~ubuntu-security/cve/CVE-2017-18269
-----------------------------------------
CVE-2020-1751: [Medium] 
Found in: glibc [2.23-0ubuntu11]
Fixed By: 2.23-0ubuntu11.2
An out-of-bounds write vulnerability was found in glibc before 2.31 when handling signal trampolines on PowerPC. Specifically, the backtrace function did not properly check the array bounds when storing the frame address, resulting in a denial of service or potential code execution. The highest threat from this vulnerability is to system availability.
http://people.ubuntu.com/~ubuntu-security/cve/CVE-2020-1751
-----------------------------------------```

【问题讨论】:

标签: docker security azure-container-service azure-container-registry clair


【解决方案1】:

要修复容器映像中的漏洞错误,您通常需要通过使用您正在使用的基础映像的更新版本更新 FROM 语句来重新编译您的映像。

例如https://hub.docker.com/_/ubuntu?tab=tags

如您所见,这张图片经常更新。

如果您使用的是特定标签(或最新标签),您可能需要从本地构建机器(例如 docker rmi )中删除镜像,以强制您的 docker 守护进程在下一个 docker build 命令中重新拉取镜像

【讨论】:

  • 感谢@djsly,但有没有我可以用来执行此更新的命令,而无需使用 dockerfile 中的 FROM 语句。我问是因为 ACR 和图像是在使用 Azure ML 工作区和 Azure ACI 部署我的 ML 模型时自动创建的,因此我没有 dockerfile。问候
  • Azure 机器学习提供了一个默认的 Docker 基础映像,因此您不必担心创建一个。您还可以使用 Azure 机器学习环境来选择特定的基础映像,或使用您提供的自定义基础映像。为部署创建映像时,基本映像用作起点。它提供了底层操作系统和组件。然后,部署过程会在部署映像之前将其他组件(例如模型、conda 环境和其他资产)添加到映像。
  • 此外,该服务会自动使用基于 Ubuntu Linux 的基本映像之一。它安装指定的 Python 包。基础镜像有 CPU 版本和 GPU 版本。 Azure 机器学习会自动检测要使用的版本。也可以使用自定义 Docker 基础镜像。 docs.microsoft.com/en-us/azure/machine-learning/…
  • 您可以在推理配置文件中包含 Azure 机器学习环境的完整规范。如果您的工作区中不存在此环境,Azure 机器学习将创建它。否则,Azure 机器学习将在必要时更新环境。以下 JSON 是一个示例:“环境”:{“docker”:{“arguments”:[]、“baseDockerfile”:null、“baseImage”:“mcr.microsoft.com/azureml/base:intelmpi2018.3-ubuntu16 .04", "启用": false, },
猜你喜欢
  • 2021-08-14
  • 2016-08-27
  • 2021-09-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-12-25
  • 2022-08-20
  • 2020-02-15
相关资源
最近更新 更多