diff --git a/content/zh/news/security/incorrect-sidecar-image-1.2.4/index.md b/content/zh/news/security/incorrect-sidecar-image-1.2.4/index.md index 30c4ac1d54..4df1ae24a8 100644 --- a/content/zh/news/security/incorrect-sidecar-image-1.2.4/index.md +++ b/content/zh/news/security/incorrect-sidecar-image-1.2.4/index.md @@ -16,9 +16,9 @@ aliases: ## 详细说明{#detailed-explanation} -由于在修复最近的 HTTP2 DoS 漏洞时我们已经执行了通信禁令,因此对于这种类型的发布来说很常见:我们预先私下构建了 Sidecar 的映像,在公开披露的同时,我们在 Docker Hub 上手动推送了该映像。 +由于在修复最近的 HTTP2 DoS 漏洞时我们已经执行了通信禁令,因此对于这种类型的发布来说很常见:我们预先私下构建了 Sidecar 的镜像,在公开披露的同时,我们在 Docker Hub 上手动推送了该镜像。 -对于无法修复安全漏洞的秘密披露版本,该 Docker 映像通常会通过我们的发行渠道作业完全自动的完成 push。 +对于无法修复安全漏洞的秘密披露版本,该 Docker 镜像通常会全自动地通过我们的发布管道作业完成推送。 我们的自动发布流程无法与漏洞披露禁令所要求的手动交互一起正常工作:发布管道保留了对 Istio 仓库旧版本代码的引用。 @@ -28,4 +28,4 @@ aliases: 对于由于此事件给您带来的不便,我们感到抱歉,并且我们[正在努力建立更好的发布系统](https://github.com/istio/istio/issues/16887),以及一种更有效的方式来处理漏洞报告。 -- 1.2 的发布管理器 +- 1.2 的发布管理 diff --git a/content/zh/news/security/istio-security-2019-001/index.md b/content/zh/news/security/istio-security-2019-001/index.md index 9d447e0140..1c5cf5fc89 100644 --- a/content/zh/news/security/istio-security-2019-001/index.md +++ b/content/zh/news/security/istio-security-2019-001/index.md @@ -2,7 +2,10 @@ title: ISTIO-SECURITY-2019-001 subtitle: 安全公告 description: 错误的权限控制。 -cve: [CVE-2019-12243] +cves: [CVE-2019-12243] +cvss: "8.9" +vector: "CVSS:3.0/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N/E:H/RL:O/RC:C" +releases: ["1.1 to 1.1.6"] publishdate: 2019-05-28 keywords: [CVE] skip_seealso: true @@ -11,13 +14,7 @@ aliases: - /zh/news/2019/cve-2019-12243 --- -{{< security_bulletin - cves="CVE-2019-12243" - cvss="8.9" - vector="CVSS:3.0/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N/E:H/RL:O/RC:C" - releases="1.1 to 1.1.6" >}} - -## 内容{#context} +{{< security_bulletin >}} 在检视 [Istio 1.1.7](/zh/news/releases/1.1.x/announcing-1.1.7) 发布公告时我们发现已修复的缺陷 [issue 13868](https://github.com/istio/istio/issues/13868) 隐含一个安全漏洞。 diff --git a/content/zh/news/security/istio-security-2019-005/index.md b/content/zh/news/security/istio-security-2019-005/index.md index 8de90a7079..b2361d069b 100644 --- a/content/zh/news/security/istio-security-2019-005/index.md +++ b/content/zh/news/security/istio-security-2019-005/index.md @@ -1,7 +1,7 @@ --- title: ISTIO-SECURITY-2019-005 subtitle: 安全公告 -description: 由于客户端请求中存在大量 HTTP header 而导致的拒绝服务。 +description: 由于客户端请求中存在大量 HTTP(请求)头 而导致的拒绝服务。 cves: [CVE-2019-15226] cvss: "7.5" vector: "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H" @@ -15,9 +15,7 @@ aliases: {{< security_bulletin >}} -## 内容{#context} - -Envoy 和 Istio 容易受到以下 DoS 攻击。收到每个传入的请求后,Envoy 将遍历请求标头,以保证请求头的总大小保持在最大限制以下。远程攻击者可能会制作一个请求,该请求的 header 的大小不会超过最大限制,但包含成千上万个小的 header,来消耗 CPU 并导致拒绝服务攻击。 +Envoy 和 Istio 容易受到以下 DoS 攻击。收到每个传入的请求后,Envoy 将遍历请求标头,以保证请求头的总大小保持在最大限制以下。远程攻击者可能会制作一个请求,该请求头的大小不会超过最大限制,但包含成千上万个小的(请求)头,来消耗 CPU 并导致拒绝服务攻击。 ## 影响范围{#impact-and-detection} diff --git a/content/zh/news/security/istio-security-2019-006/index.md b/content/zh/news/security/istio-security-2019-006/index.md index 9eec1b242f..38f77926b6 100644 --- a/content/zh/news/security/istio-security-2019-006/index.md +++ b/content/zh/news/security/istio-security-2019-006/index.md @@ -2,7 +2,10 @@ title: ISTIO-SECURITY-2019-006 subtitle: 安全公告 description: 拒绝服务。 -cve: [CVE-2019-18817] +cves: [CVE-2019-18817] +cvss: "7.5" +vector: "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:H/RL:O/RC:C" +releases: ["1.3 to 1.3.4"] publishdate: 2019-11-07 keywords: [CVE] skip_seealso: true @@ -10,13 +13,7 @@ aliases: - /zh/news/2019/istio-security-2019-006 --- -{{< security_bulletin - cves="CVE-2019-18817" - cvss="7.5" - vector="CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:H/RL:O/RC:C" - releases="1.3 to 1.3.4" >}} - -## 内容{#context} +{{< security_bulletin >}} Envoy 以及随后的 Istio 容易受到以下 DoS 攻击。 如果选项 `continue_on_listener_filters_timeout` 设置为 `True`,则可以在 Envoy 中触发无限循环。自从 Istio 1.3 中引入协议检测功能以来,Istio 就是这种情况。 diff --git a/content/zh/news/security/istio-security-2020-004/index.md b/content/zh/news/security/istio-security-2020-004/index.md new file mode 100644 index 0000000000..0ac7f8c0d6 --- /dev/null +++ b/content/zh/news/security/istio-security-2020-004/index.md @@ -0,0 +1,60 @@ +--- +title: ISTIO-SECURITY-2020-004 +subtitle: Security Bulletin +description: Default Kiali security configuration allows full control of mesh. +cves: [CVE-2020-1764] +cvss: "8.7" +vector: "AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N" +releases: ["1.4 to 1.4.6", "1.5"] +publishdate: 2020-03-25 +keywords: [CVE] +skip_seealso: true +--- + +{{< security_bulletin >}} + +Istio 1.4 到 1.4.6 和 Istio 1.5 包含以下漏洞: + +* __[`CVE-2020-1764`](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-1764)__: + Istio 对 Kiali 使用默认的 `signing_key`。这允许攻击者查看和修改 Istio 配置。 + * CVSS Score: 8.7 [AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N](https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N&version=3.1) + +此外,此版本中还修复了另一个CVE,如下所述: +[Kiali 安全告](https://kiali.io/news/security-bulletins/kiali-security-001/). + +## 检测{#detection} + +您的安装在以下配置中容易受到攻击: + +* Kiali 版本为1.15或更早版本。 +* Kiali 登录令牌和签名密钥未设置。 + +请运行以下命令,检查您的 Kiali 版本: + +{{< text bash >}} +$ kubectl get pods -n istio-system -l app=kiali -o yaml | grep image: +{{< /text >}} + +请运行以下命令确定您的登录令牌是否未设置,并检查输出是否为空: + +{{< text bash >}} +$ kubectl get deploy kiali -n istio-system -o yaml | grep LOGIN_TOKEN_SIGNING_KEY +{{< /text >}} + +请运行以下命令确定您的签名密钥是否未设置,并检查输出是否为空: + +{{< text bash >}} +$ kubectl get cm kiali -n istio-system -o yaml | grep signing_key +{{< /text >}} + +## 防范{#mitigation} + +* 对于 1.4.x 部署: 请升级至 [Istio 1.4.7](/zh/news/releases/1.4.x/announcing-1.4.7) 或更高的版本。 +* 对于 1.5.x 部署: 请升级至 [Istio 1.5.1](/zh/news/releases/1.5.x/announcing-1.5.1) 或更高的版本。 +* 解决方法:您可以使用以下命令将签名密钥手动更新为随机令牌: + + {{< text bash >}} + $ kubectl get cm kiali -n istio-system -o yaml | sed "s/server:/login_token:\\\n \ + signing_key: $(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 20 | head -n 1)\\\nserver:/" \ + | kubectl apply -f - ; kubectl delete pod -l app=kiali -n istio-system + {{< /text >}} diff --git a/content/zh/news/security/istio-security-2020-006/index.md b/content/zh/news/security/istio-security-2020-006/index.md new file mode 100644 index 0000000000..5556e632fb --- /dev/null +++ b/content/zh/news/security/istio-security-2020-006/index.md @@ -0,0 +1,61 @@ +--- +title: ISTIO-SECURITY-2020-006 +subtitle: 安全公告 +description: Envoy使用HTTP2库中的拒绝服务。 +cves: [CVE-2020-11080] +cvss: "7.5" +vector: "AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H" +releases: ["1.4 to 1.4.9", "1.5 to 1.5.4", "1.6 to 1.6.1"] +publishdate: 2020-06-11 +keywords: [CVE] +skip_seealso: true +--- + +{{< security_bulletin >}} + +已修复并公开披露影响 Envoy 使用的 HTTP2 库的漏洞 (c.f. [拒绝服务:SETTINGS 帧过大](https://github.com/nghttp2/nghttp2/security/advisories/GHSA-q5wr-xfw9-q7xr) ). 不幸的是,Istio 没有从可靠的披露评审中受益。 + +* __[CVE-2020-11080](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-11080)__: +通过发送特制数据包,攻击者可能会导致 CPU 峰值激增100%。 这可以发送到 Ingress 网关或 Sidecar。 + * CVSS Score: 7.5 [AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H](https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N&version=3.1) + +## 防范{#mitigation} + +可以使用以下配置在 Ingress Gateway 上禁用 HTTP2 支持作为临时解决方法,例如(请注意,如果您不通过 Ingress 公开 gRPC 服务,则可以禁用 Ingress 的 HTTP2 支持): + +{{< text yaml >}} + +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: disable-ingress-h2 + namespace: istio-system +spec: + workloadSelector: + labels: + istio: ingressgateway + configPatches: + - applyTo: NETWORK_FILTER # http connection manager is a filter in Envoy + match: + context: GATEWAY + listener: + filterChain: + filter: + name: "envoy.http_connection_manager" + patch: + operation: MERGE + value: + typed_config: + "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager + codec_type: HTTP1 +{{< /text >}} + +* 对于 Istio 1.4.x 部署:请升级至 [Istio 1.4.10](/zh/news/releases/1.4.x/announcing-1.4.10) 或更高的版本。 +* 对于 Istio 1.5.x 部署:请升级至 [Istio 1.5.5](/zh/news/releases/1.5.x/announcing-1.5.5) 或更高的版本。 +* 对于 Istio 1.6.x 部署:请升级至 [Istio 1.6.2](/zh/news/releases/1.6.x/announcing-1.6.2) 或更高的版本。 + +## 鸣谢{#credit} + +我们要感谢 `Michael Barton` 引起了我们对这个公开披露漏洞的关注。 + +{{< boilerplate "security-vulnerability" >}} diff --git a/content/zh/news/security/istio-security-2020-007/custom-bootstrap-runtime.yaml b/content/zh/news/security/istio-security-2020-007/custom-bootstrap-runtime.yaml new file mode 100644 index 0000000000..73087c7572 --- /dev/null +++ b/content/zh/news/security/istio-security-2020-007/custom-bootstrap-runtime.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: istio-custom-bootstrap-config +data: + custom_bootstrap.json: | + { + "layered_runtime": { + "layers": [ + {"name": "static_layer_0", + "static_layer": { + "overload": { + "global_downstream_max_connections": 250000 + } + }}, + {"name": "admin", "admin_layer": {}} + ] + } + } diff --git a/content/zh/news/security/istio-security-2020-007/gateway-patch.yaml b/content/zh/news/security/istio-security-2020-007/gateway-patch.yaml new file mode 100644 index 0000000000..afd56b35e9 --- /dev/null +++ b/content/zh/news/security/istio-security-2020-007/gateway-patch.yaml @@ -0,0 +1,18 @@ +spec: + template: + spec: + containers: + - name: istio-proxy + env: + - name: ISTIO_BOOTSTRAP_OVERRIDE + value: /etc/istio/custom-bootstrap/custom_bootstrap.json + volumeMounts: + - mountPath: /etc/istio/custom-bootstrap + name: custom-bootstrap-volume + readOnly: true + volumes: + - configMap: + name: istio-custom-bootstrap-config + defaultMode: 420 + optional: false + name: custom-bootstrap-volume diff --git a/content/zh/news/security/istio-security-2020-007/index.md b/content/zh/news/security/istio-security-2020-007/index.md new file mode 100644 index 0000000000..d74ad2f598 --- /dev/null +++ b/content/zh/news/security/istio-security-2020-007/index.md @@ -0,0 +1,81 @@ +--- +title: ISTIO-SECURITY-2020-007 +subtitle: 安全公告 +description: Envoy 中的多个拒绝服务漏洞。 +cves: [CVE-2020-12603, CVE-2020-12605, CVE-2020-8663, CVE-2020-12604] +cvss: "7.5" +vector: "AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H" +releases: ["1.5 to 1.5.6", "1.6 to 1.6.3"] +publishdate: 2020-06-30 +keywords: [CVE] +skip_seealso: true +--- + +{{< security_bulletin >}} + +Envoy 和 Istio 容易受到4个新发现漏洞的攻击: + +* __[CVE-2020-12603](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-12603)__: +通过发送特制数据包,攻击者可能会导致 Envoy 在代理 HTTP/2 请求或响应时消耗过多的内存。 + * CVSS Score: 7.0 [AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H](https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H&version=3.1) + +* __[CVE-2020-12605](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-12605)__: +在处理特制 HTTP/1.1 的数据包时,攻击者可能会导致 Envoy 消耗过多的内存。 + * CVSS Score: 7.0 [AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H](https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H&version=3.1) + +* __[CVE-2020-8663](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-8663)__: +当接受太多连接时,攻击者可能导致 Envoy 耗尽文件描述符。 + * CVSS Score: 7.0 [AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H](https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H&version=3.1) + +* __[CVE-2020-12604](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-12604)__: +在处理特制数据包时,攻击者可能会导致内存使用增加。 + * CVSS Score: 5.3 [AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L](https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H&version=3.1) + +## 防范{#mitigation} + +* 对于 1.5.x 部署: 请升级至 [Istio 1.5.7](/zh/news/releases/1.5.x/announcing-1.5.7) 或更高的版本。 +* 对于 1.6.x 部署: 请升级至 [Istio 1.6.4](/zh/news/releases/1.6.x/announcing-1.6.4) 或更高的版本。 + +{{< warning >}} +您必须采取以下附加步骤来防范 CVE-2020-8663。 +{{< /warning >}} + +通过添加[下游连接](https://www.envoyproxy.io/docs/envoy/v1.14.3/configuration/operations/overload_manager/overload_manager#limiting-active-connections)的配置限制,在 Envoy 解决 CVE-2020-8663。 必须配置此限制以防范此漏洞。 在 Ingress 网关上执行如下步骤来配置限制。 + +1. 通过下载 [custom-bootstrap-runtime.yaml](/zh/news/security/istio-security-2020-007/custom-bootstrap-runtime.yaml)创建配置映射。 根据部署中各个网关实例所需的并发连接数,在配置映射中更新 `global_downstream_max_connections` 。 一旦达到限制,Envoy 将开始拒绝 TCP 连接。 + + {{< text bash >}} + $ kubectl -n istio-system apply -f custom-bootstrap-runtime.yaml + {{< /text >}} + +1. 使用以上配置来修补 Ingress 网关。 下载 [gateway-patch.yaml](/zh/news/security/istio-security-2020-007/gateway-patch.yaml) 文件并使用如下命令。 + + {{< text bash >}} + $ kubectl --namespace istio-system patch deployment istio-ingressgateway --patch "$(cat gateway-patch.yaml)" + {{< /text >}} + +1. 确认新限制已经配置。 + + {{< text bash >}} + $ ISTIO_INGRESS_PODNAME=$(kubectl get pods -l app=istio-ingressgateway -n istio-system -o jsonpath="{.items[0].metadata.name}") + $ kubectl --namespace istio-system exec -i -t ${ISTIO_INGRESS_PODNAME} -c istio-proxy -- curl -sS http://localhost:15000/runtime + + { + "entries": { + "overload.global_downstream_max_connections": { + "layer_values": [ + "", + "250000", + "" + ], + "final_value": "250000" + } + }, + "layers": [ + "static_layer_0", + "admin" + ] + } + {{< /text >}} + +{{< boilerplate "security-vulnerability" >}} diff --git a/content/zh/news/security/istio-security-2020-008/index.md b/content/zh/news/security/istio-security-2020-008/index.md new file mode 100644 index 0000000000..8942bc2ec2 --- /dev/null +++ b/content/zh/news/security/istio-security-2020-008/index.md @@ -0,0 +1,37 @@ +--- +title: ISTIO-SECURITY-2020-008 +subtitle: 安全公告 +description: 通配符 DNS 使用者主机名称的验证不正确。 +cves: [CVE-2020-15104] +cvss: "6.6" +vector: "AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:L/A:N/E:F/RL:O/RC:C" +releases: ["1.5 to 1.5.7", "1.6 to 1.6.4", "All releases prior to 1.5"] +publishdate: 2020-07-09 +keywords: [CVE] +skip_seealso: true +--- + +{{< security_bulletin >}} + +Istio 容易受到新发现漏洞的攻击: + +* __[`CVE-2020-15104`](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-15104)__: +当验证 TLS 证书时,Envoy 错误地允许将通配符 DNS 使用者主机名称应用于多个子域。例如,在 SAN 为 `*.example.com` 通配的情况下,Envoy 错误地允许使用 `nested.subdomain.example.com`,而它只允许使用 `subdomain.example.com`。 + * CVSS Score: 6.6 [AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:L/A:N/E:F/RL:O/RC:C](https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:L/A:N/E:F/RL:O/RC:C&version=3.1) + +Istio 用户通过以下方式暴露此漏洞: + +* 通过 [Envoy 筛选器](/zh/docs/reference/config/networking/envoy-filter/)直接使用 Envoy 的`verify_subject_alt_name`和`match_subject_alt_names`配置。 + +* 使用Istio 的[`subjectAltNames`字段在目标规则与客户端 TLS 设置](/zh/docs/reference/config/networking/destination-rule/#ClientTLSSettings)。具有包含`nested.subdomain.example.com` 的 `subjectAltNames` 字段的目标规则错误地接受来自主机名称(SAN)为`*.example.com`的上游层证书。 相反,应该存在一个`*.subdomain.example.com`或`nested.subdomain.example.com`的 SAN。 + +* 使用 Istio 的[服务条目中的`subjectAltNames`](/zh/docs/reference/config/networking/service-entry/)。带有`subjectAltNames`字段的值类似于`nested.subdomain.example.com`的服务条目错误地接受来自 SAN 为`*.example.com` 的上游层证书。 + +Istio CA(以前称为 Citadel)不使用 DNS 通配符 SAN 颁发证书。 该漏洞仅影响验证外部颁发证书的配置。 + +## 防范{#mitigation} + +* 对于 1.5.x deployments: 部署: 请升级至 [Istio 1.5.8](/zh/news/releases/1.5.x/announcing-1.5.8) 或更高的版本。 +* 对于 1.6.x deployments: 部署: 请升级至 [Istio 1.6.5](/zh/news/releases/1.6.x/announcing-1.6.5) 或更高的版本。 + +{{< boilerplate "security-vulnerability" >}} diff --git a/content/zh/news/security/istio-security-2020-009/index.md b/content/zh/news/security/istio-security-2020-009/index.md new file mode 100644 index 0000000000..cb0772c636 --- /dev/null +++ b/content/zh/news/security/istio-security-2020-009/index.md @@ -0,0 +1,61 @@ +--- +title: ISTIO-SECURITY-2020-009 +subtitle: 安全公告 +description: TCP 服务的授权策略news/security/istio-security-2020-004/index.md中用于 Principals /名称空间的通配符后缀其 Envoy 配置不正确。 +cves: [CVE-2020-16844] +cvss: "6.8" +vector: "AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N" +releases: ["1.5 to 1.5.8", "1.6 to 1.6.7"] +publishdate: 2020-08-11 +keywords: [CVE] +skip_seealso: true +--- +{{< security_bulletin >}} + +Istio 容易受到新发现隐患的攻击: + +* __[`CVE-2020-16844`](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-16844)__:对于源 Principals 和名称空间字段使用通配符后缀(例如:`* -some-suffix` )的具有 `DENY` 操作的已定义授权策略TCP服务调用者,将永远不会被拒绝访问。 + * CVSS Score: 6.8 [AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N](https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N&version=3.1) + +Istio 用户以下列方式容易受到此漏洞的影响: + +如果用户具有类似于以下内容的授权 + +{{< text yaml >}} +apiVersion: security.istio.io/v1beta1 +kind: AuthorizationPolicy +metadata: + name: foo + namespace: foo +spec: + action: DENY + rules: + - from: + - source: + principals: + - */ns/ns1/sa/foo # indicating any trust domain, ns1 namespace, foo svc account +{{< /text >}} + +Istio 将 Principal (和 `source.principal`)字段转换为 Envoy 级别的字符串匹配。 + +{{< text yaml >}} +stringMatch: + suffix: spiffe:///ns/ns1/sa/foo +{{< /text >}} + +它将不匹配任何合法的调用者,因为它错误的包含了 `spiffe://` 字符串。正确的字符串匹配应该是: + +{{< text yaml >}} +stringMatch: + regex: spiffe://.*/ns/ns1/sa/foo +{{< /text >}} + +`AuthorizationPolicy` 中的前缀和精确匹配不受影响,它们中的 `ALLOW` 操作也一样;HTTP 也不受影响。 + +## 防范{#mitigation} + +* 对于 Istio 1.5.x 部署:请升级至 [Istio 1.5.9](/zh/news/releases/1.5.x/announcing-1.5.8) 或是更高的版本。 +* 对于 Istio 1.6.x 部署:请升级至 [Istio 1.6.8](/zh/news/releases/1.6.x/announcing-1.6.8) 或是更高的版本。 +* 不要在 TCP 服务的源 Principal 或名称空间字段的 `DENY` 策略中使用后缀匹配,并在适用的情况下使用前缀和精确匹配。 在可能的情况下,在您的服务中将 TCP 更改为 HTTP 作为端口名后缀。 + +{{< boilerplate "security-vulnerability" >}} \ No newline at end of file diff --git a/content/zh/news/security/istio-security-2021-001/index.md b/content/zh/news/security/istio-security-2021-001/index.md new file mode 100644 index 0000000000..86317c3e27 --- /dev/null +++ b/content/zh/news/security/istio-security-2021-001/index.md @@ -0,0 +1,42 @@ +--- +title: ISTIO-SECURITY-2021-001 +subtitle: 安全公告 +description: 滥用 AuthorizationPolicy 时,可以绕过 JWT 身份验证。 +cves: [CVE-2021-21378] +cvss: "8.2" +vector: "AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N" +releases: ["1.9.0"] +publishdate: 2021-03-01 +keywords: [CVE] +skip_seealso: true +--- + +{{< security_bulletin >}} + +Envoy 和 Istio 容易受到新发现漏洞的攻击: + +* __[CVE-2021-21378](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-21378)__: + JWT 身份验证绕过未知的颁发者令牌 + * CVSS Score: 8.2 [AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N](https://www.first.org/cvss/calculator/3.0#CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N) + +如果仅将 `RequestAuthentication` 用于 JWT 验证,则您会受到此漏洞的影响。 + +如果您同时使用 `RequestAuthentication` 和 `AuthorizationPolicy` 进行 JWT 验证,则您不受此漏洞的影响。 + +{{< warning >}} +请注意,`RequestAuthentication` 用于定义应接受的发行者列表。 它不会拒绝没有 JWT 令牌请求。 +{{< /warning >}} + +对于Istio,此漏洞仅在您的服务: + +* 接受 JWT 令牌(带有 `RequestAuthentication`) +* 有一些未应用 `AuthorizationPolicy`的服务路径。 + +对于同时满足这两个条件的服务路径,带有 JWT 令牌且令牌发行者不在 `RequestAuthentication` 中的传入请求将绕过 JWT 验证,而不是被拒绝。 + +## 防范{#mitigation} + +为了进行正确的 JWT 验证,您应该始终使用 istio.io 文档上记录的 `AuthorizationPolicy` 来[指定有效令牌](/zh/docs/tasks/security/authentication/authn-policy/#require-a-valid-token). +为此,您将必须审核所有 `RequestAuthentication` 和后续的 `AuthorizationPolicy` 资源,以确保它们与记录的实践保持一致。 + +{{< boilerplate "security-vulnerability" >}}