ghsa-p45j-vfv5-wprq
Vulnerability from github
Published
2023-09-11 13:47
Modified
2023-09-20 21:28
Summary
RKE2 supervisor port is vulnerable to unauthenticated remote denial-of-service (DoS) attack via TLS SAN stuffing attack
Details

Impact

An issue was found in RKE2 where an attacker with network access to RKE2 servers' supervisor port (TCP 9345) can force the TLS server to add entries to the certificate's Subject Alternative Name (SAN) list, through a stuffing attack, until the certificate grows so large that it exceeds the maximum size allowed by TLS client implementations. OpenSSL for example will raise an excessive message size error when this occurs. No authentication is necessary to perform this attack, only the ability to perform a TLS handshake against the supervisor port (TCP 9345).

Affected servers will continue to operate, but clients (server or agent nodes) will fail to establish new connections when joining or rejoining the cluster, thus leading to a denial of service (DoS) attack.

Remediation

Upgrade to a fixed release: - v1.28.1+rke2r1 - v1.27.5+rke2r1 - v1.26.8+rke2r1 - v1.25.13+rke2r1 - 1.24.17+rke2r1

If you are using RKE2 1.27 or earlier, you must also add the parameter tls-san-security: true to the RKE2 configuration to enable enhanced security for the supervisor's TLS SAN list. This option defaults to true starting with RKE2 1.28.

Note that this flag changes the behavior of RKE2's supervisor listener. You should ensure that you configure node-external-ip on servers that will be connected to via an external IP, and add tls-san entries for any load-balancers or VIP addresses that will be associated with the supervisor port. External IPs and load-balancer/VIP addresses will no longer be added to the supervisor certificate's SAN list unless explicitly configured.

Mitigation

If you cannot upgrade to a fixed release, the certificate can be "frozen" by running the following command against the cluster:

shell kubectl annotate secret -n kube-system rke2-serving listener.cattle.io/static=true

⚠️ IMPORTANT CAUTION: Note that this mitigation will prevent the certificate from adding new SAN entries when servers join the cluster, and automatically renewing itself when it is about to expire. If you do this, you should delete the annotation when adding new servers to the cluster, or when the certificate is within 90 days of expiring, so that it can be updated. Once that is done, you can freeze it again.

Affected certificates can be reset by performing the following steps: * Run kubectl delete secret -n kube-system rke2-serving * Delete /var/lib/rancher/rke2/server/tls/dynamic-cert.json from all servers, and restart the rke2-server service.

Background

The RKE2 supervisor listens on port TCP 9345 and uses the rancher/dynamiclistener library to dynamically generate TLS certificates that contain TLS Subject Alternative Names (SAN) for any host name or IP address requested by a client. This is done to allow servers and external load-balancers to be added to the cluster without the administrator having to explicitly know and configure in advance a fixed list of endpoints that the supervisor may be hosted at.

The library allows the embedding application to configure a callback that is used to filter addresses requested by clients; but this was not previously implemented in RKE2.

For more information

If you have any questions or comments about this advisory:

Show details on source website


{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/rancher/rke2"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.24.17"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/rancher/rke2"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.25.0"
            },
            {
              "fixed": "1.25.13"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/rancher/rke2"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.26.0"
            },
            {
              "fixed": "1.26.8"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/rancher/rke2"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.27.0"
            },
            {
              "fixed": "1.27.5"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/rancher/rke2"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.28.0"
            },
            {
              "fixed": "1.28.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2023-32186"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-770"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2023-09-11T13:47:16Z",
    "nvd_published_at": "2023-09-19T10:15:13Z",
    "severity": "HIGH"
  },
  "details": "### Impact\n\nAn issue was found in RKE2 where an attacker with network access to RKE2 servers\u0027 supervisor port (TCP 9345) can force the TLS server to add entries to the certificate\u0027s Subject Alternative Name (SAN) list, through a stuffing attack, until the certificate grows so large that it exceeds the maximum size allowed by TLS client implementations. OpenSSL for example will raise an `excessive message size` error when this occurs. No authentication is necessary to perform this attack, only the ability to perform a TLS handshake against the supervisor port (TCP 9345).\n\nAffected servers will continue to operate, but clients (server or agent nodes) will fail to establish new connections when joining or rejoining the cluster, thus leading to a denial of service (DoS) attack.\n\n### Remediation\n\nUpgrade to a fixed release:\n- v1.28.1+rke2r1\n- v1.27.5+rke2r1\n- v1.26.8+rke2r1\n- v1.25.13+rke2r1\n- 1.24.17+rke2r1\n\nIf you are using RKE2 1.27 or earlier, you must also add the parameter `tls-san-security: true` to the RKE2 configuration to enable enhanced security for the supervisor\u0027s TLS SAN list. This option defaults to `true` starting with RKE2 1.28.\n\nNote that this flag changes the behavior of RKE2\u0027s supervisor listener. You should ensure that you configure `node-external-ip` on servers that will be connected to via an external IP, and add `tls-san` entries for any load-balancers or VIP addresses that will be associated with the supervisor port. External IPs and load-balancer/VIP addresses will no longer be added to the supervisor certificate\u0027s SAN list unless explicitly configured.\n\n### Mitigation\n\nIf you cannot upgrade to a fixed release, the certificate can be \"frozen\" by running the following command against the cluster:\n\n```shell\nkubectl annotate secret -n kube-system rke2-serving listener.cattle.io/static=true\n```\n\n**\u26a0\ufe0f IMPORTANT CAUTION:** Note that this mitigation will prevent the certificate from adding new SAN entries when servers join the cluster, and automatically renewing itself when it is about to expire. If you do this, you should delete the annotation when adding new servers to the cluster, or when the certificate is within 90 days of expiring, so that it can be updated. Once that is done, you can freeze it again.\n\nAffected certificates can be reset by performing the following steps:\n* Run `kubectl delete secret -n kube-system rke2-serving`\n* Delete `/var/lib/rancher/rke2/server/tls/dynamic-cert.json` from all servers, and restart the `rke2-server` service.\n\n### Background\n\nThe RKE2 supervisor listens on port TCP 9345 and uses the `rancher/dynamiclistener` library to dynamically generate TLS certificates that contain TLS Subject Alternative Names (SAN) for any host name or IP address requested by a client. This is done to allow servers and external load-balancers to be added to the cluster without the administrator having to explicitly know and configure in advance a fixed list of endpoints that the supervisor may be hosted at.\n\nThe library allows the embedding application to configure a callback that is used to filter addresses requested by clients; but this was not previously implemented in RKE2.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n- Reach out to the [SUSE Rancher Security team](https://github.com/rancher/rke2/security/policy) for security related inquiries.\n- Open an issue in the [RKE2](https://github.com/rancher/rke2/issues/new/choose) repository.\n- Verify with our [support matrix](https://www.suse.com/suse-rancher/support-matrix/all-supported-versions/) and [product support lifecycle](https://www.suse.com/lifecycle/).",
  "id": "GHSA-p45j-vfv5-wprq",
  "modified": "2023-09-20T21:28:30Z",
  "published": "2023-09-11T13:47:16Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/rancher/rke2/security/advisories/GHSA-p45j-vfv5-wprq"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-32186"
    },
    {
      "type": "WEB",
      "url": "https://bugzilla.suse.com/show_bug.cgi?id=CVE-2023-32186"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/rancher/rke2"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "RKE2 supervisor port is vulnerable to unauthenticated remote denial-of-service (DoS) attack via TLS SAN stuffing attack"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.