Skip to content

CVE-2023-6245 Infinite decoding loop through specially crafted payload

HighCVSS 7.5 EPSS 1.2%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: yes · technical impact: partial
Technology
Ubuntu

Description

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.

Upgrade path

4 packages: 3 fixed, 1 with no fix yet.

PackageAffectedFixed inStatus
ubuntu/candid(Ubuntu 18.04) = 1.0.0~alpha+201804191824-24b36a9-0ubuntu1; = 1.0.0~alpha+201804191824-24b36a9-0ubuntu2; All versions No fix listed No fix yet
crates.io candid(crates.io) >= 0.9.0, < 0.9.10 0.9.10 Fixed
dfinity candid >= 0.9.0, < 0.9.10 0.9.10 Fixed
Internet Computer Candid >= 0.9.0, < 0.9.10 0.9.10 Fixed

Affected products

ProductAffected versionsFixed in
crates.io candid(crates.io) >= 0.9.0, < 0.9.10 0.9.10
Internet Computer Candid >= 0.9.0, < 0.9.10 0.9.10
dfinity candid >= 0.9.0, < 0.9.10 0.9.10
ubuntu/candid(Ubuntu:18.04) All versions No fix listed
ubuntu/candid(Ubuntu:18.04) = 1.0.0~alpha+201804191824-24b36a9-0ubuntu1 No fix listed
ubuntu/candid(Ubuntu:18.04) = 1.0.0~alpha+201804191824-24b36a9-0ubuntu2 No fix listed

References