gsd-2023-6245
Vulnerability from gsd
Modified
2023-12-13 01:20
Details
The Candid library causes a Denial of Service while parsing a specially crafted payload with 'empty' data type. For example, if the payload is `record { * ; empty }` and the canister interface expects `record { * }` then the Rust candid decoder treats empty as an extra field required by the type. The problem with the type empty is that the candid Rust library wrongly categorizes empty as a recoverable error when skipping the field and thus causing an infinite decoding loop. Canisters using affected versions of candid are exposed to denial of service by causing the decoding to run indefinitely until the canister traps due to reaching maximum instruction limit per execution round. Repeated exposure to the payload will result in degraded performance of the canister. Note: Canisters written in Motoko are unaffected.
Aliases
Aliases



{
  "GSD": {
    "alias": "CVE-2023-6245",
    "id": "GSD-2023-6245"
  },
  "gsd": {
    "metadata": {
      "exploitCode": "unknown",
      "remediation": "unknown",
      "reportConfidence": "confirmed",
      "type": "vulnerability"
    },
    "osvSchema": {
      "aliases": [
        "CVE-2023-6245"
      ],
      "details": "The Candid library causes a Denial of Service while \nparsing a specially crafted payload with \u0027empty\u0027 data type. For example,\n if the payload is `record { * ; empty }` and the canister interface expects `record { * }` then the Rust candid decoder treats empty as an extra field required by the type.  The problem with the type empty is that the candid Rust library wrongly categorizes empty as a recoverable error when skipping the field and thus causing an infinite decoding loop.\n\n\nCanisters using affected versions of candid\n are exposed to denial of service by causing the decoding to run \nindefinitely until the canister traps due to reaching maximum \ninstruction limit per execution round. Repeated exposure to the payload \nwill result in degraded performance of the canister. Note: Canisters written in Motoko are unaffected.\n\n\n\n",
      "id": "GSD-2023-6245",
      "modified": "2023-12-13T01:20:32.955406Z",
      "schema_version": "1.4.0"
    }
  },
  "namespaces": {
    "cve.org": {
      "CVE_data_meta": {
        "ASSIGNER": "cve@mitre.org",
        "ID": "CVE-2023-6245",
        "STATE": "PUBLIC"
      },
      "affects": {
        "vendor": {
          "vendor_data": [
            {
              "product": {
                "product_data": [
                  {
                    "product_name": "Candid",
                    "version": {
                      "version_data": [
                        {
                          "version_affected": "\u003c",
                          "version_name": "0.9.0",
                          "version_value": "0.9.10"
                        }
                      ]
                    }
                  }
                ]
              },
              "vendor_name": "Internet Computer"
            }
          ]
        }
      },
      "data_format": "MITRE",
      "data_type": "CVE",
      "data_version": "4.0",
      "description": {
        "description_data": [
          {
            "lang": "eng",
            "value": "The Candid library causes a Denial of Service while \nparsing a specially crafted payload with \u0027empty\u0027 data type. For example,\n if the payload is `record { * ; empty }` and the canister interface expects `record { * }` then the Rust candid decoder treats empty as an extra field required by the type.  The problem with the type empty is that the candid Rust library wrongly categorizes empty as a recoverable error when skipping the field and thus causing an infinite decoding loop.\n\n\nCanisters using affected versions of candid\n are exposed to denial of service by causing the decoding to run \nindefinitely until the canister traps due to reaching maximum \ninstruction limit per execution round. Repeated exposure to the payload \nwill result in degraded performance of the canister. Note: Canisters written in Motoko are unaffected.\n\n\n\n"
          }
        ]
      },
      "generator": {
        "engine": "Vulnogram 0.1.0-dev"
      },
      "impact": {
        "cvss": [
          {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "HIGH",
            "baseScore": 7.5,
            "baseSeverity": "HIGH",
            "confidentialityImpact": "NONE",
            "integrityImpact": "NONE",
            "privilegesRequired": "NONE",
            "scope": "UNCHANGED",
            "userInteraction": "NONE",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
            "version": "3.1"
          }
        ]
      },
      "problemtype": {
        "problemtype_data": [
          {
            "description": [
              {
                "cweId": "CWE-835",
                "lang": "eng",
                "value": "CWE-835 Loop with Unreachable Exit Condition (\u0027Infinite Loop\u0027)"
              }
            ]
          },
          {
            "description": [
              {
                "cweId": "CWE-1288",
                "lang": "eng",
                "value": "CWE-1288 Improper Validation of Consistency within Input"
              }
            ]
          },
          {
            "description": [
              {
                "cweId": "CWE-168",
                "lang": "eng",
                "value": "CWE-168 Improper Handling of Inconsistent Special Elements"
              }
            ]
          },
          {
            "description": [
              {
                "cweId": "CWE-20",
                "lang": "eng",
                "value": "CWE-20 Improper Input Validation"
              }
            ]
          }
        ]
      },
      "references": {
        "reference_data": [
          {
            "name": "https://github.com/dfinity/candid/pull/478",
            "refsource": "MISC",
            "url": "https://github.com/dfinity/candid/pull/478"
          },
          {
            "name": "https://internetcomputer.org/docs/current/references/candid-ref",
            "refsource": "MISC",
            "url": "https://internetcomputer.org/docs/current/references/candid-ref"
          },
          {
            "name": "https://github.com/dfinity/candid/blob/master/spec/Candid.md",
            "refsource": "MISC",
            "url": "https://github.com/dfinity/candid/blob/master/spec/Candid.md"
          },
          {
            "name": "https://github.com/dfinity/candid/security/advisories/GHSA-7787-p7x6-fq3j",
            "refsource": "MISC",
            "url": "https://github.com/dfinity/candid/security/advisories/GHSA-7787-p7x6-fq3j"
          },
          {
            "name": "https://internetcomputer.org/docs/current/references/ic-interface-spec",
            "refsource": "MISC",
            "url": "https://internetcomputer.org/docs/current/references/ic-interface-spec"
          }
        ]
      },
      "source": {
        "discovery": "INTERNAL"
      }
    },
    "nvd.nist.gov": {
      "cve": {
        "configurations": [
          {
            "nodes": [
              {
                "cpeMatch": [
                  {
                    "criteria": "cpe:2.3:a:dfinity:candid:*:*:*:*:*:rust:*:*",
                    "matchCriteriaId": "F95D6602-30FA-4473-9660-F87B18A446FD",
                    "versionEndExcluding": "0.9.10",
                    "versionStartIncluding": "0.9.0",
                    "vulnerable": true
                  }
                ],
                "negate": false,
                "operator": "OR"
              }
            ]
          }
        ],
        "descriptions": [
          {
            "lang": "en",
            "value": "The Candid library causes a Denial of Service while \nparsing a specially crafted payload with \u0027empty\u0027 data type. For example,\n if the payload is `record { * ; empty }` and the canister interface expects `record { * }` then the Rust candid decoder treats empty as an extra field required by the type.  The problem with the type empty is that the candid Rust library wrongly categorizes empty as a recoverable error when skipping the field and thus causing an infinite decoding loop.\n\n\nCanisters using affected versions of candid\n are exposed to denial of service by causing the decoding to run \nindefinitely until the canister traps due to reaching maximum \ninstruction limit per execution round. Repeated exposure to the payload \nwill result in degraded performance of the canister. Note: Canisters written in Motoko are unaffected.\n\n\n\n"
          },
          {
            "lang": "es",
            "value": "La librer\u00eda Candid provoca una denegaci\u00f3n de servicio mientras analiza un payload especialmente manipulado con un tipo de datos \"vac\u00edo\". Por ejemplo, si el payload es `record { * ; empty }` y la interfaz del recipiente espera `record { * }`, entonces el decodificador sincero de Rust trata el vac\u00edo como un campo adicional requerido por el tipo. El problema con el tipo vac\u00edo es que la sincera librer\u00eda Rust clasifica err\u00f3neamente vac\u00edo como un error recuperable al omitir el campo y, por lo tanto, provoca un bucle de decodificaci\u00f3n infinito. Los contenedores que utilizan versiones afectadas de candid est\u00e1n expuestos a una denegaci\u00f3n de servicio al hacer que la decodificaci\u00f3n se ejecute indefinidamente hasta que el contenedor se bloquea debido a que alcanza el l\u00edmite m\u00e1ximo de instrucciones por ronda de ejecuci\u00f3n. La exposici\u00f3n repetida a el payload dar\u00e1 como resultado un rendimiento degradado del recipiente. Nota: Los botes escritos en Motoko no se ven afectados."
          }
        ],
        "id": "CVE-2023-6245",
        "lastModified": "2023-12-13T14:41:10.210",
        "metrics": {
          "cvssMetricV31": [
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "NETWORK",
                "availabilityImpact": "HIGH",
                "baseScore": 7.5,
                "baseSeverity": "HIGH",
                "confidentialityImpact": "NONE",
                "integrityImpact": "NONE",
                "privilegesRequired": "NONE",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
                "version": "3.1"
              },
              "exploitabilityScore": 3.9,
              "impactScore": 3.6,
              "source": "nvd@nist.gov",
              "type": "Primary"
            },
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "NETWORK",
                "availabilityImpact": "HIGH",
                "baseScore": 7.5,
                "baseSeverity": "HIGH",
                "confidentialityImpact": "NONE",
                "integrityImpact": "NONE",
                "privilegesRequired": "NONE",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
                "version": "3.1"
              },
              "exploitabilityScore": 3.9,
              "impactScore": 3.6,
              "source": "6b35d637-e00f-4228-858c-b20ad6e1d07b",
              "type": "Secondary"
            }
          ]
        },
        "published": "2023-12-08T15:15:08.233",
        "references": [
          {
            "source": "6b35d637-e00f-4228-858c-b20ad6e1d07b",
            "tags": [
              "Product"
            ],
            "url": "https://github.com/dfinity/candid/blob/master/spec/Candid.md"
          },
          {
            "source": "6b35d637-e00f-4228-858c-b20ad6e1d07b",
            "tags": [
              "Patch"
            ],
            "url": "https://github.com/dfinity/candid/pull/478"
          },
          {
            "source": "6b35d637-e00f-4228-858c-b20ad6e1d07b",
            "tags": [
              "Patch",
              "Third Party Advisory"
            ],
            "url": "https://github.com/dfinity/candid/security/advisories/GHSA-7787-p7x6-fq3j"
          },
          {
            "source": "6b35d637-e00f-4228-858c-b20ad6e1d07b",
            "tags": [
              "Product"
            ],
            "url": "https://internetcomputer.org/docs/current/references/candid-ref"
          },
          {
            "source": "6b35d637-e00f-4228-858c-b20ad6e1d07b",
            "tags": [
              "Product"
            ],
            "url": "https://internetcomputer.org/docs/current/references/ic-interface-spec"
          }
        ],
        "sourceIdentifier": "6b35d637-e00f-4228-858c-b20ad6e1d07b",
        "vulnStatus": "Analyzed",
        "weaknesses": [
          {
            "description": [
              {
                "lang": "en",
                "value": "CWE-835"
              }
            ],
            "source": "nvd@nist.gov",
            "type": "Primary"
          },
          {
            "description": [
              {
                "lang": "en",
                "value": "CWE-1288"
              },
              {
                "lang": "en",
                "value": "CWE-168"
              },
              {
                "lang": "en",
                "value": "CWE-20"
              },
              {
                "lang": "en",
                "value": "CWE-835"
              }
            ],
            "source": "6b35d637-e00f-4228-858c-b20ad6e1d07b",
            "type": "Secondary"
          }
        ]
      }
    }
  }
}


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.


Loading…

Loading…