Skip to content

Latest commit

 

History

History
60 lines (35 loc) · 1.58 KB

clickhouse-delta-divide-by-zero-dos-xray-199946.md

File metadata and controls

60 lines (35 loc) · 1.58 KB
description title date_published last_updated xray_id vul_id cvss severity discovered_by type
CVE-2021-42389 Medium severity. Divide-by-zero in ClickHouse leads to denial of service
ClickHouse Divide-by-zero DoS
2022-03-15
2022-03-15
XRAY-199946
CVE-2021-42389
6.5
medium
Uriya Yavnieli
vulnerability

Summary

A divide-by-zero in ClickHouse's Delta compression codec can allow an authenticated network attacker to perform denial of service

Component

ClickHouse

Affected versions

ClickHouse (, 21.10.2.15), fixed in 21.10.2.15

Description

A low-privileged authenticated network attacker can trigger this issue by sending crafted compressed data to ClickHouse. Triggering the issue will crash the ClickHouse process, causing denial of service.

The ClickHouse decompression code reads the first byte of the compressed buffer and performs a modulo operation with it to get the remainder:

UInt8 bytes_size = source[0];
UInt8 bytes_to_skip = uncompressed_size % bytes_size;

In case bytes_size is 0, it will end up dividing by zero.

PoC

No PoC is supplied for this issue

Vulnerability Mitigations

No mitigations are provided for this vulnerability.

In order to fully fix this vulnerability, we recommend upgrading ClickHouse to version 21.10.2.15.

References

(JFrog) Security Vulnerabilities Found in ClickHouse Open-Source Software

NVD