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

[fix][sec] Drop hdfs2 support, Upgrade hadoop3 to 3.4.0 and dnsjava to 3.6.2 to address CVE-2024-25638 #23411

Merged
merged 5 commits into from
Oct 11, 2024

Conversation

lhotari
Copy link
Member

@lhotari lhotari commented Oct 8, 2024

Motivation

In pulsar-io connectors, Hadoop 2 and Hadoop 3 versions before 3.4.0 depend on dnsjava 2.1.7 which is outdated and contains CVE-2024-25638 .

Upgrading dnsjava 2.1.7 to dnsjava 3.6.x isn't possible directly since dnsjava 3.x API isn't compatible with dnsjava 2.1.x API. dnsjava dependency has been excluded in this PR since hadoop 3.4.1 isn't released yet.

Modifications

  • remove pulsar-io/hdfs2 connector since it depends on Hadoop 2 which is outdated and isn't maintained.
  • upgrade hadoop3 version 3.4.0.
  • upgrade hbase version used in pulsar-io/hbase to 2.6.0-hadoop3.
  • use dependencyManagement to enforce the versions so that hadoop3 3.4.0 libraries are used consistently
    • hadoop3 doesn't have a bom so each depended dependency will have to be included in dependencyManagement
  • exclude dnsjava dependencies since it's an optional dependency in hadoop
  • enforce dnsjava to 3.6.2 to avoid any other dependency in pulling the vulnerable version.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@lhotari lhotari added this to the 4.0.0 milestone Oct 8, 2024
@lhotari lhotari self-assigned this Oct 8, 2024
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Oct 8, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.25%. Comparing base (bbc6224) to head (8de699c).
Report is 664 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #23411      +/-   ##
============================================
+ Coverage     73.57%   74.25%   +0.67%     
- Complexity    32624    34357    +1733     
============================================
  Files          1877     1940      +63     
  Lines        139502   146889    +7387     
  Branches      15299    16176     +877     
============================================
+ Hits         102638   109069    +6431     
- Misses        28908    29391     +483     
- Partials       7956     8429     +473     
Flag Coverage Δ
inttests 27.40% <ø> (+2.81%) ⬆️
systests 24.38% <ø> (+0.06%) ⬆️
unittests 73.61% <ø> (+0.76%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 654 files with indirect coverage changes

@lhotari lhotari requested a review from shibd October 8, 2024 12:59
@lhotari lhotari marked this pull request as draft October 8, 2024 13:02
@lhotari
Copy link
Member Author

lhotari commented Oct 8, 2024

It looks like we need to wait for Hadoop 3.4.1 release to complete: https://issues.apache.org/jira/browse/HADOOP-19237

@lhotari
Copy link
Member Author

lhotari commented Oct 8, 2024

"Exclude the META-INF/services/java.net.spi.InetAddressResolverProvider from your project" is mentioned as a workaround in dnsjava/dnsjava#338. Related Hadoop PR https://github.com/apache/hadoop/pull/7070/files . I guess that there might be ways to exclude and disable dnsjava too. However Hadoop 3.4.1 release would be useful.

@lhotari
Copy link
Member Author

lhotari commented Oct 8, 2024

Let's wait for Hadoop 3.4.1 release that is in voting: https://lists.apache.org/thread/6dshj3nb26mlhzhmd8xkmw78l3zk896t

@lhotari lhotari modified the milestones: 4.0.0, 4.1.0 Oct 10, 2024
@lhotari lhotari marked this pull request as ready for review October 11, 2024 13:38
@lhotari lhotari modified the milestones: 4.1.0, 4.0.0 Oct 11, 2024
@lhotari lhotari modified the milestones: 4.0.0, 4.1.0 Oct 11, 2024
@merlimat merlimat merged commit d5e3675 into apache:master Oct 11, 2024
59 of 60 checks passed
@lhotari lhotari modified the milestones: 4.1.0, 4.0.0 Oct 11, 2024
lhotari added a commit that referenced this pull request Oct 11, 2024
lhotari added a commit to apache/pulsar-site that referenced this pull request Oct 21, 2024
lhotari added a commit that referenced this pull request Nov 22, 2024
)"

This reverts commit c1cc2d6.

This change is reverted in branch-3.0 since #23591 was needed due to #23411 which
is not included in branch-3.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants