Skip to content

maven: migrate short-term to reload4j v1.2.18 - #5878

Merged
sureshanaparti merged 4 commits into
apache:4.16from
shapeblue:log4j-short-term-remedy
Feb 8, 2022
Merged

maven: migrate short-term to reload4j v1.2.18#5878
sureshanaparti merged 4 commits into
apache:4.16from
shapeblue:log4j-short-term-remedy

Conversation

@yadvr

@yadvryadvr commented Jan 19, 2022

Copy link
Copy Markdown
Member

This migrate to log4j 1.x fork, reload4j 1.2.18.0 which is drop-in
replacement and addresses some immediate CVE and issues.

This will require some manual test of logging, as well as smoketests.

Fixes: (from https://reload4j.qos.ch/)
Standardize and sanitize the build - fixed in 1.2.18.0
CVE-2021-4104 (JMSAppender) - fixed in 1.2.18.0 by hardening
CVE-2022-23302 (JMSSink) - fixed in 1.2.18.1 by hardening
CVE-2019-17571 (SocketServer) - fixed in 1.2.18.0 by hardening
CVE-2020-9493 and CVE-2022-23307 (Chainsaw) - fixed in 1.2.18.1 by hardening
CVE-2022-23305 (JDBCAppender) - fixed in 1.2.18.2 by hardening the component.
broken MDC in newer JDKs - fixed in 1.2.18.0
XML entity injection attack - fixed in 1.2.18.3 by hardening
CVE-2020-9488 (SMTPAppender) fixed in 1.2.18.3 by hardening

This migrate to log4j 1.x fork, reload4j 1.2.18.0 which is drop-in
replacement and addresses some immediate CVE and issues.
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
@yadvr
yadvr marked this pull request as draft January 19, 2022 12:35
@apacheapache deleted a comment from blueorangutanJan 31, 2022
@apacheapache deleted a comment from blueorangutanJan 31, 2022
@yadvr

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@rohityadavcloud a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@yadvr
yadvr marked this pull request as ready for review January 31, 2022 07:24
@yadvryadvr added this to the 4.16.1.0 milestone Jan 31, 2022
@yadvr

Copy link
Copy Markdown
MemberAuthor

Tested locally, the build works - pl help review, advise on the PR cc @DaanHoogland@borisstoyanov@vladimirpetrov@sureshanaparti@nvazquez@weizhouapache@shwstppr@mlsorensen

@weizhouapache

Copy link
Copy Markdown
Member

nice !
looking forward to packaging and smoke test results.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2396

@DaanHooglandDaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good

<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${cs.log4j.version}</version>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do we (still) need the version here?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Not sure, did n't want to refactor/experiment; so I've left all build config as is just replaced log4j with reload4j.

<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${cs.log4j.version}</version>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do we (still) need the version here?

@apacheapache deleted a comment from blueorangutanJan 31, 2022
@apacheapache deleted a comment from blueorangutanJan 31, 2022
@apacheapache deleted a comment from blueorangutanJan 31, 2022
@apacheapache deleted a comment from blueorangutanJan 31, 2022
@yadvr

yadvr commented Feb 1, 2022

Copy link
Copy Markdown
MemberAuthor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@rohityadavcloud a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@apacheapache deleted a comment from blueorangutanFeb 1, 2022
@apacheapache deleted a comment from blueorangutanFeb 1, 2022
@apacheapache deleted a comment from blueorangutanFeb 1, 2022
@blueorangutan

Copy link
Copy Markdown

Trillian Build Failed (tid-3147)

@blueorangutan

Copy link
Copy Markdown

Trillian Build Failed (tid-3153)

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-3146)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 32735 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5878-t3146-kvm-centos7.zip
Smoke tests completed. 92 look OK, 0 have errors
Only failed tests results shown below:

TestResultTime (s)Test File

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-3148)
Environment: kvm-ubuntu20 (x2), Advanced Networking with Mgmt server 7
Total time taken: 34994 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5878-t3148-kvm-ubuntu20.zip
Smoke tests completed. 91 look OK, 1 have errors
Only failed tests results shown below:

TestResultTime (s)Test File
test_01_migrate_VM_and_root_volumeError69.45test_vm_life_cycle.py
test_02_migrate_VM_with_two_data_disksError50.44test_vm_life_cycle.py

@mlsorensen

Copy link
Copy Markdown
Contributor

@rohityadavcloud - just looked at the dependency tree with this change. Do we need to move to slf4j 1.7.35? See https://www.slf4j.org/news.html

In this release, the "slf4j-log4j12" artifact automatically instructs Maven to use the "slf4j-reload4j" artifact instead. As you might have guessed, the "slf4j-reload4j" binding delegates log processing to the reload4j logging framework.

I'm also seeing esapi pulling in log4j 1.2.17, and contrail plugin pulling in log4j 1.2.16.

Co-authored-by: Marcus Sorensen <mls@apple.com>
@yadvr

yadvr commented Feb 4, 2022

Copy link
Copy Markdown
MemberAuthor

Thanks for the review @mlsorensen and the exclusion fix. I'll kick some tests.
@blueorangutan package

@yadvr

yadvr commented Feb 4, 2022

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@rohityadavcloud a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2466

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan test matrix

@blueorangutan

Copy link
Copy Markdown

@sureshanaparti a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-3174)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 30545 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5878-t3174-kvm-centos7.zip
Smoke tests completed. 92 look OK, 0 have errors
Only failed tests results shown below:

TestResultTime (s)Test File

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-3173)
Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7
Total time taken: 33375 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5878-t3173-xenserver-71.zip
Smoke tests completed. 90 look OK, 2 have errors
Only failed tests results shown below:

TestResultTime (s)Test File
test_01_sys_vm_startFailure0.09test_secondary_storage.py
test_02_cancel_host_maintenace_with_migration_jobsError19.91test_host_maintenance.py
test_03_cancel_host_maintenace_with_migration_jobs_failureError4.56test_host_maintenance.py

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-3175)
Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7
Total time taken: 38556 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5878-t3175-vmware-65u2.zip
Smoke tests completed. 91 look OK, 1 have errors
Only failed tests results shown below:

TestResultTime (s)Test File
test_02_upgrade_kubernetes_clusterFailure419.74test_kubernetes_clusters.py

@yadvryadvr linked an issue Feb 6, 2022 that may be closed by this pull request
@yadvr

yadvr commented Feb 7, 2022

Copy link
Copy Markdown
MemberAuthor

cc @Pearl1594 are the k8s failures intermittent?
@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@rohityadavcloud a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✖️ suse15. SL-JID 2482

@yadvr

yadvr commented Feb 7, 2022

Copy link
Copy Markdown
MemberAuthor

@blueorangutan test centos7 vmware-67u3

@Pearl1594

Copy link
Copy Markdown
Contributor

cc @Pearl1594 are the k8s failures intermittent? @blueorangutan package

Based on the logs it seems to be due to :
unable to drain Kubernetes node on VM : testcluster-FDZXL0-control-17ecbae5fe8'
I haven't encountered this failure before, however, it may have been a one off occurrence wherein, the worker node may not be in ready state and the control node is being drained, which leaves the k8s with no other nodes to schedule pods on. Let's wait for the current test run to complete. If it fails yet again, I'll investigate it. Thanks

@blueorangutan

Copy link
Copy Markdown

@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2489

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-3207)
Environment: kvm-rocky8 (x2), Advanced Networking with Mgmt server r8
Total time taken: 35063 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5878-t3207-kvm-rocky8.zip
Smoke tests completed. 91 look OK, 1 have errors
Only failed tests results shown below:

TestResultTime (s)Test File
test_01_migrate_VM_and_root_volumeError85.20test_vm_life_cycle.py
test_02_migrate_VM_with_two_data_disksError49.60test_vm_life_cycle.py

@borisstoyanovborisstoyanov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, managed to build/deploy this and run it with RockyLinux8(CentOS8 eq), centos7, ubuntu20, centos7-ev. There were no exceptions related to logging in management and agent logs.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

remove use of unsupported log4gv1

8 participants

@yadvr@blueorangutan@weizhouapache@DaanHoogland@mlsorensen@sureshanaparti@Pearl1594@borisstoyanov