Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add log4j2.formatMsgNoLookups logging property to ES < 7.2 #5157

Conversation

thbkrkr
Copy link
Contributor

@thbkrkr thbkrkr commented Dec 13, 2021

Prepends the JVM parameter -Dlog4j2.formatMsgNoLookups=true to the environment variable ES_JAVA_OPTS
in order to mitigate the Log4Shell vulnerability CVE-2021-44228, if it is not yet defined by the user,
for versions of Elasticsearch before 7.2.0.

@thbkrkr thbkrkr added the >enhancement Enhancement of existing functionality label Dec 13, 2021
@thbkrkr thbkrkr force-pushed the add-jvm-logging-property-to-possibly-mitigate-Log4Shell branch from e9f497f to 8ac9958 Compare December 13, 2021 16:07
thbkrkr and others added 3 commits December 13, 2021 21:00
Co-authored-by: Michael Morello <michael.morello@gmail.com>
Co-authored-by: Michael Morello <michael.morello@gmail.com>
Copy link
Contributor

@barkbay barkbay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a few tests with 6.8.21, 7.1.1, LGTM

pkg/controller/elasticsearch/nodespec/podspec_test.go Outdated Show resolved Hide resolved
pkg/controller/elasticsearch/nodespec/podspec.go Outdated Show resolved Hide resolved
pkg/controller/elasticsearch/nodespec/podspec.go Outdated Show resolved Hide resolved
pkg/controller/elasticsearch/nodespec/podspec.go Outdated Show resolved Hide resolved
pkg/controller/elasticsearch/nodespec/podspec.go Outdated Show resolved Hide resolved
thbkrkr and others added 2 commits December 14, 2021 09:38
Co-authored-by: Michael Morello <michael.morello@gmail.com>
@thbkrkr thbkrkr merged commit e57d73d into elastic:master Dec 14, 2021
@thbkrkr thbkrkr added the v2.0.0 label Dec 15, 2021
david-kow pushed a commit to david-kow/cloud-on-k8s that referenced this pull request Dec 15, 2021
CVE-2021-44228 (elastic#5157)

Prepends the JVM parameter -Dlog4j2.formatMsgNoLookups=true to the environment variable ES_JAVA_OPTS
in order to mitigate the Log4Shell vulnerability CVE-2021-44228, if it is not yet defined by the user,
for versions of Elasticsearch before 7.2.0.
# Conflicts:
#	pkg/controller/elasticsearch/nodespec/podspec.go
david-kow added a commit that referenced this pull request Dec 15, 2021
… vulnerability CVE-2021-44228 (#5157) (#5164)

* Configure JVM logging for ES < 7.12 to mitigate Log4Shell vulnerability CVE-2021-44228 (#5157)

Prepends the JVM parameter -Dlog4j2.formatMsgNoLookups=true to the environment variable ES_JAVA_OPTS
in order to mitigate the Log4Shell vulnerability CVE-2021-44228, if it is not yet defined by the user,
for versions of Elasticsearch before 7.2.0.
# Conflicts:
#	pkg/controller/elasticsearch/nodespec/podspec.go

* Fixing bad conflict resolution

* Fix backport merge issue

* PR fixes

Co-authored-by: Thibault Richard <thbkrkr@users.noreply.github.com>
@david-kow david-kow changed the title Add log4j2.formatMsgNoLookups logging property to ES < 7.12 Add log4j2.formatMsgNoLookups logging property to ES < 7.2 Dec 16, 2021
@thbkrkr thbkrkr deleted the add-jvm-logging-property-to-possibly-mitigate-Log4Shell branch January 4, 2022 14:10
fantapsody pushed a commit to fantapsody/cloud-on-k8s that referenced this pull request Feb 7, 2023
CVE-2021-44228 (elastic#5157)

Prepends the JVM parameter -Dlog4j2.formatMsgNoLookups=true to the environment variable ES_JAVA_OPTS
in order to mitigate the Log4Shell vulnerability CVE-2021-44228, if it is not yet defined by the user,
for versions of Elasticsearch before 7.2.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement Enhancement of existing functionality v1.9.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants