Skip to content

Upgrade org.apache.logging.log4j:log4j-core and log4j-api libraries#24507

Merged
agrawalreetika merged 1 commit intoprestodb:masterfrom
Dilli-Babu-Godari:log4j_upgrade
Feb 13, 2025
Merged

Upgrade org.apache.logging.log4j:log4j-core and log4j-api libraries#24507
agrawalreetika merged 1 commit intoprestodb:masterfrom
Dilli-Babu-Godari:log4j_upgrade

Conversation

@Dilli-Babu-Godari
Copy link
Contributor

@Dilli-Babu-Godari Dilli-Babu-Godari commented Feb 6, 2025

Description

Upgraded org.apache.logging.log4j:log4j-core from 2.17.1 to 2.24.3
Upgraded org.apache.logging.log4j:log4j-api from 2.17.1 to 2.24.3

Motivation and Context

Addresses below CVEs

Screenshot 2025-02-06 at 4 55 39 PM

Impact

Test Plan

Contributor checklist

  • Please make sure your submission complies with our co
    ntributing guide
    , in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== RELEASE NOTES ==

General Changes
*  Upgraded org.apache.logging.log4j:log4j-core from 2.17.1 to 2.24.3 in response to `CVE-2024-47554<https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-47554>`
*  Upgraded org.apache.logging.log4j:log4j-api from 2.17.1 to 2.24.3 in response to `CVE-2024-47554 <https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-47554>`

@prestodb-ci prestodb-ci added the from:IBM PR from IBM label Feb 6, 2025
@Dilli-Babu-Godari Dilli-Babu-Godari marked this pull request as ready for review February 6, 2025 12:24
@Dilli-Babu-Godari Dilli-Babu-Godari requested a review from a team as a code owner February 6, 2025 12:24
Copy link
Member

@imjalpreet imjalpreet left a comment

Choose a reason for hiding this comment

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

@Dilli-Babu-Godari, I noticed that these libraries are also included with version 2.17.1 in presto-druid. Is there a specific reason we’re not upgrading them as well? Could you take a look?

@Dilli-Babu-Godari
Copy link
Contributor Author

Dilli-Babu-Godari commented Feb 7, 2025

@Dilli-Babu-Godari, I noticed that these libraries are also included with version 2.17.1 in presto-druid. Is there a specific reason we’re not upgrading them as well? Could you take a look?

I have now added the presto-druid as well. Could you please review it again?

Copy link
Member

@agrawalreetika agrawalreetika left a comment

Choose a reason for hiding this comment

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

@Dilli-Babu-Godari Please verify both the dependency by checking the dependency tree, I still see these 2 are coming from some more packages.

@Dilli-Babu-Godari Dilli-Babu-Godari force-pushed the log4j_upgrade branch 2 times, most recently from 0016219 to a0993dc Compare February 11, 2025 03:48
@Dilli-Babu-Godari
Copy link
Contributor Author

@Dilli-Babu-Godari Please verify both the dependency by checking the dependency tree, I still see these 2 are coming from some more packages.

I have made changes, so the versions are now aligned.
Screenshot 2025-02-11 at 10 08 17 AM

@steveburnett
Copy link
Contributor

In the release note entries, please add a link to a CVE. See Phrasing in the Release Notes Guidelines for an example and formatting. Because there are so many CVEs shown in this one, choose an appropriate CVE - perhaps the most recent one?

Copy link
Member

@imjalpreet imjalpreet left a comment

Choose a reason for hiding this comment

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

@Dilli-Babu-Godari thanks for the changes. Can you also confirm the output of the below commands:

./mvnw dependency:tree -Dincludes=org.apache.logging.log4j:log4j-api

./mvnw dependency:tree -Dincludes=org.apache.logging.log4j:log4j-core

@steveburnett
Copy link
Contributor

In the release note entries, please add a link to a CVE. See Phrasing in the Release Notes Guidelines for an example and formatting. Because there are so many CVEs shown in this one, choose an appropriate CVE - perhaps the most recent one?

Thank you!

@Dilli-Babu-Godari
Copy link
Contributor Author

@Dilli-Babu-Godari thanks for the changes. Can you also confirm the output of the below commands:

./mvnw dependency:tree -Dincludes=org.apache.logging.log4j:log4j-api

./mvnw dependency:tree -Dincludes=org.apache.logging.log4j:log4j-core

Screenshot 2025-02-12 at 10 06 35 PM Screenshot 2025-02-12 at 5 25 40 PM

Build is successful and the modules are having respective upgraded versions of log4j-core and log4j-api

Copy link
Member

@imjalpreet imjalpreet left a comment

Choose a reason for hiding this comment

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

@Dilli-Babu-Godari LGTM, I am approving the PR but I have one minor request. The commit message exceeds the single-line character limit. Please update it to the following::

Upgrade log4j-core and log4j-api dependencies

Upgrade org.apache.logging.log4j:log4j-core from 2.17.1 to 2.24.3
Upgrade org.apache.logging.log4j:log4j-api from 2.17.1 to 2.24.3

Fixes almost 25 CVEs.

Upgraded org.apache.logging.log4j:log4j-core from 2.17.1 to 2.24.3
Upgraded org.apache.logging.log4j:log4j-api from 2.17.1 to 2.24.3

Fixes almost 25 CVEs.
@agrawalreetika agrawalreetika merged commit c85d3d3 into prestodb:master Feb 13, 2025
54 checks passed
@aaneja
Copy link
Contributor

aaneja commented Feb 20, 2025

@agrawalreetika @imjalpreet @jaystarshot
Are we sure we want to take a direct dependency on Log4J ? We do not use this library for logging in Presto (we use Airlift). We of course, cannot control the deps of the connectors, but IMO we should avoid it in presto-root / presto-main

@jaystarshot
Copy link
Member

@aaneja That makes sense to me. Would you be willing to handle the fix or revert?

@imjalpreet
Copy link
Member

@aaneja Would it be a problem since we are just adding it in the DependencyManagement section of root pom to control the version? As part of the dependencies, it's still only included in the required connectors. Please let me know if I'm misunderstanding anything.

@aaneja
Copy link
Contributor

aaneja commented Feb 21, 2025

@imjalpreet You're right that it doesn't bring it in to specific modules unless referenced. However, I would like to avoid the reference/temptation to refer to Log4J for the core modules. Having connectors take a hard reference to Log4J (when needed) seems like a good compromise

Dilli-Babu-Godari pushed a commit to Dilli-Babu-Godari/presto that referenced this pull request Feb 21, 2025
revert of PR: prestodb#24507

Upgrading module specific dependencies.

Upgraded org.apache.logging.log4j:log4j-core from 2.17.1 to 2.24.3
Upgraded org.apache.logging.log4j:log4j-api from 2.17.1 to 2.24.3
Dilli-Babu-Godari added a commit to Dilli-Babu-Godari/presto that referenced this pull request Feb 21, 2025
revert of PR: prestodb#24507

Upgrading module specific dependencies.

Upgraded org.apache.logging.log4j:log4j-core from 2.17.1 to 2.24.3
Upgraded org.apache.logging.log4j:log4j-api from 2.17.1 to 2.24.3
Dilli-Babu-Godari added a commit to Dilli-Babu-Godari/presto that referenced this pull request Feb 21, 2025
revert of PR: prestodb#24507

Upgrading module specific dependencies.

Upgraded org.apache.logging.log4j:log4j-core from 2.17.1 to 2.24.3
Upgraded org.apache.logging.log4j:log4j-api from 2.17.1 to 2.24.3
Dilli-Babu-Godari added a commit to Dilli-Babu-Godari/presto that referenced this pull request Feb 21, 2025
revert of PR: prestodb#24507

Upgrading module specific dependencies.

Upgraded org.apache.logging.log4j:log4j-core from 2.17.1 to 2.24.3
Upgraded org.apache.logging.log4j:log4j-api from 2.17.1 to 2.24.3
Dilli-Babu-Godari added a commit to Dilli-Babu-Godari/presto that referenced this pull request Feb 22, 2025
revert of PR: prestodb#24507

Upgrading module specific dependencies.

Upgraded org.apache.logging.log4j:log4j-core from 2.17.1 to 2.24.3
Upgraded org.apache.logging.log4j:log4j-api from 2.17.1 to 2.24.3
Dilli-Babu-Godari added a commit to Dilli-Babu-Godari/presto that referenced this pull request Feb 23, 2025
revert of PR: prestodb#24507

Upgrading module specific dependencies.

Upgraded org.apache.logging.log4j:log4j-core from 2.17.1 to 2.24.3
Upgraded org.apache.logging.log4j:log4j-api from 2.17.1 to 2.24.3
@Dilli-Babu-Godari
Copy link
Contributor Author

Dilli-Babu-Godari commented Feb 24, 2025

@aaneja I have raised a seperate PR 24605 and addressed all the comments there.

Dilli-Babu-Godari added a commit to Dilli-Babu-Godari/presto that referenced this pull request Feb 25, 2025
refactor of PR: prestodb#24507

Upgrading module specific dependencies.

Upgraded org.apache.logging.log4j:log4j-core from 2.17.1 to 2.24.3
Upgraded org.apache.logging.log4j:log4j-api from 2.17.1 to 2.24.3
jaystarshot pushed a commit that referenced this pull request Mar 4, 2025
refactor of PR: #24507

Upgrading module specific dependencies.

Upgraded org.apache.logging.log4j:log4j-core from 2.17.1 to 2.24.3
Upgraded org.apache.logging.log4j:log4j-api from 2.17.1 to 2.24.3
kevinwilfong pushed a commit to kevinwilfong/presto that referenced this pull request Mar 5, 2025
refactor of PR: prestodb#24507

Upgrading module specific dependencies.

Upgraded org.apache.logging.log4j:log4j-core from 2.17.1 to 2.24.3
Upgraded org.apache.logging.log4j:log4j-api from 2.17.1 to 2.24.3
jp-sivaprasad pushed a commit to jp-sivaprasad/presto that referenced this pull request Mar 10, 2025
refactor of PR: prestodb#24507

Upgrading module specific dependencies.

Upgraded org.apache.logging.log4j:log4j-core from 2.17.1 to 2.24.3
Upgraded org.apache.logging.log4j:log4j-api from 2.17.1 to 2.24.3
@prestodb-ci prestodb-ci mentioned this pull request Mar 28, 2025
30 tasks
@prestodb-ci prestodb-ci requested review from a team, bibith4 and nmahadevuni and removed request for a team April 3, 2025 04:05
pradeepvaka pushed a commit to pradeepvaka/presto that referenced this pull request Apr 11, 2025
refactor of PR: prestodb#24507

Upgrading module specific dependencies.

Upgraded org.apache.logging.log4j:log4j-core from 2.17.1 to 2.24.3
Upgraded org.apache.logging.log4j:log4j-api from 2.17.1 to 2.24.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants