Heap buffer overflow in T64 codec decompression
Package
ClickHouse Cloud
(ClickHouse Cloud)
Affected versions
< v23.9.2.47475
Patched versions
v23.9.2.47475
ClickHouse v23.10
(ClickHouse v23.10)
< v23.10.2.13
v23.10.2.13
ClickHouse v23.3
(ClickHouse v23.3)
< v23.3.16.7
v23.3.16.7
ClickHouse v23.8
(ClickHouse v23.8)
< v23.9.4.11
v23.9.4.11
ClickHouse v23.9
(ClickHouse v23.9)
< v23.8.6.16
v23.8.6.16
Impact
A heap buffer overflow issue was discovered in ClickHouse server. An attacker could send a specially crafted payload to the native interface exposed by default on port 9000/tcp, triggering a bug in the decompression logic of T64 codec that crashes the ClickHouse server process. This attack does not require authentication.
Note that this exploit can also be triggered via HTTP protocol, however, the attacker will need a valid credential as the HTTP authentication take places first.
Patches
Fix has been pushed to version v23.10.2.13-stable, v23.9.4.11-stable, v23.8.6.16-lts, v23.3.16.7-lts
Workarounds
Affected users are advised to block native port access and temporary switch to HTTP protocol to reduce the exposure before they can upgrade to supported versions.
Backport
If you are maintaining your own forked version of ClickHouse. The fix for this vulnerability can be found in this pull request.