Skip to content

Confirmation that clickhouse-jdbc is not affected by CVE-2021-44228? #779

@hodgesrm

Description

@hodgesrm

Hi, we're checking for vulnerabilities in ClickHouse due to CVE-2021-44228 (Log4Shell log4j vulnerability). It affects log4j 2 versions <= 2.14.1.

So far as I can tell from analysis of the code, the following are true and there's no vulnerability.

  1. clickhouse-jdbc uses SLF4J 1.2, which is intended as an adapter on Log4j 1.2, which is not affected.
  2. Running mvn package downloads log4j-1.2.17.jar, which does not contain affected code.

Here's a grep of references to log4j in relevant pom.xml and github config files.

 ./clickhouse-client/pom.xml:            <artifactId>slf4j-log4j12</artifactId>
./clickhouse-http-client/pom.xml:            <artifactId>slf4j-log4j12</artifactId>
./clickhouse-jdbc/src/test/resources/log4j.properties:log4j.rootLogger=WARN, STDOUT
./clickhouse-jdbc/src/test/resources/log4j.properties:#log4j.category.ru.yandex.clickhouse=DEBUG
./clickhouse-jdbc/src/test/resources/log4j.properties:#log4j.logger.org.apache.http=DEBUG
./clickhouse-jdbc/src/test/resources/log4j.properties:log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
./clickhouse-jdbc/src/test/resources/log4j.properties:log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
./clickhouse-jdbc/src/test/resources/log4j.properties:log4j.appender.STDOUT.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.sss} [%t] [%-5p] {%c{1}:%L} - %m%n
./clickhouse-jdbc/pom.xml:            <artifactId>slf4j-log4j12</artifactId>
./.github/workflows/benchmark.yml:          find . -type f -name "log4j.*" -exec rm -fv '{}' \;
./.github/workflows/benchmark.yml:          find . -type f -name "log4j.*" -exec rm -fv '{}' \;
./.github/workflows/release.yml:          find . -type f -name "log4j.*" -exec rm -fv '{}' \;
./.github/workflows/third_party_libs.yml:          find . -type f -name "log4j.*" -exec rm -fv '{}' \;
./.github/workflows/analysis.yml:          find . -type f -name "log4j.*" -exec rm -fv '{}' \;
./pom.xml:                <artifactId>slf4j-log4j12</artifactId>

If there's a vulnerability it could only be because a user deployed their own version of Log4j in an application or altered the clickhouse-jdbc build.

Can someone confirm this reasoning?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions