Skip to content

Commit fdd9506

Browse files
priteaumarkgoddard
authored andcommitted
Mitigate two Log4j vulnerabilities in Apache Storm
The Log4j version was bumped on GitHub [1] but it is still pending inclusion in a release of Apache Storm. Apply the alternative mitigation recommended by Log4j [2] of removing the JndiLookup class from the classpath. [1] apache/storm#3427 [2] https://logging.apache.org/log4j/2.x/security.html Change-Id: Ib3ecd73f9e39e320acb2c5f0962b8af9b1a817e9 (cherry picked from commit 448e4f5)
1 parent c8d3709 commit fdd9506

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

docker/storm/storm-base/Dockerfile.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
1212
{% if base_package_type == 'rpm' %}
1313
{% set storm_packages = [
1414
'java-1.8.0-openjdk-headless',
15+
'zip',
1516
] %}
1617
{% elif base_package_type == 'deb' %}
1718

@@ -23,6 +24,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
2324

2425
{% set storm_packages = [
2526
'openjdk-' + java_version + '-jre-headless',
27+
'zip',
2628
] %}
2729
{% endif %}
2830

@@ -40,6 +42,9 @@ RUN curl -o /tmp/storm.tgz ${storm_url} \
4042
&& tar --strip 1 -xvf /tmp/storm.tgz -C /opt/storm \
4143
&& rm -f /tmp/storm.tgz
4244

45+
# Mitigation for CVE-2021-44228 and CVE-2021-45046: remove the JndiLookup class
46+
# from the classpath
47+
RUN zip -q -d /opt/storm/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class
4348
{% endblock %}
4449

4550
{% block storm_python_version %}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
security:
3+
- |
4+
Adds mitigation for Apache Log4j 2 Remote Code Execution (RCE)
5+
vulnerabilities CVE-2021-44228 and CVE-2021-45046 to Apache Storm.

0 commit comments

Comments
 (0)