Skip to content

Commit

Permalink
HADOOP-19237. Upgrade to dnsjava 3.6.1 due to CVEs (#6961)
Browse files Browse the repository at this point in the history
Contributed by P J Fanning
  • Loading branch information
pjfanning authored Aug 1, 2024
1 parent 059e996 commit c593c17
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion LICENSE-binary
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/util/tree
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/compat/{fstatat|openat|unlinkat}.h

com.github.luben:zstd-jni:1.5.2-1
dnsjava:dnsjava:2.1.7
dnsjava:dnsjava:3.6.1
org.codehaus.woodstox:stax2-api:4.2.1


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ allowed_expr+="|^[^-]*-default.xml$"
allowed_expr+="|^[^-]*-version-info.properties$"
# * Hadoop's application classloader properties file.
allowed_expr+="|^org.apache.hadoop.application-classloader.properties$"
# Comes from dnsjava, not sure if relocatable.
allowed_expr+="|^messages.properties$"
# public suffix list used by httpcomponents
allowed_expr+="|^mozilla/$"
allowed_expr+="|^mozilla/public-suffix-list.txt$"
Expand Down
3 changes: 3 additions & 0 deletions hadoop-client-modules/hadoop-client-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@
<exclude>jnamed*</exclude>
<exclude>lookup*</exclude>
<exclude>update*</exclude>
<exclude>META-INF/versions/21/*</exclude>
<exclude>META-INF/versions/21/**/*</exclude>
</excludes>
</filter>
<filter>
Expand All @@ -243,6 +245,7 @@
<excludes>
<exclude>META-INF/versions/9/module-info.class</exclude>
<exclude>META-INF/versions/11/module-info.class</exclude>
<exclude>META-INF/versions/21/module-info.class</exclude>
</excludes>
</filter>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1682,7 +1682,7 @@ public void exec(Zone zone, Record record) throws IOException {
DNSSEC.sign(rRset, dnskeyRecord, privateKey,
inception, expiration);
LOG.info("Adding {}", rrsigRecord);
rRset.addRR(rrsigRecord);
zone.addRecord(rrsigRecord);

//addDSRecord(zone, record.getName(), record.getDClass(),
// record.getTTL(), inception, expiration);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ public void testMissingReverseLookup() throws Exception {
Name name = Name.fromString("19.1.17.172.in-addr.arpa.");
Record question = Record.newRecord(name, Type.PTR, DClass.IN);
Message query = Message.newQuery(question);
OPTRecord optRecord = new OPTRecord(4096, 0, 0, Flags.DO, null);
OPTRecord optRecord = new OPTRecord(4096, 0, 0, Flags.DO);
query.addRecord(optRecord, Section.ADDITIONAL);
byte[] responseBytes = getRegistryDNS().generateReply(query, null);
Message response = new Message(responseBytes);
Expand Down Expand Up @@ -392,7 +392,7 @@ private List<Record> assertDNSQuery(String lookup, int type, int numRecs)
Name name = Name.fromString(lookup);
Record question = Record.newRecord(name, type, DClass.IN);
Message query = Message.newQuery(question);
OPTRecord optRecord = new OPTRecord(4096, 0, 0, Flags.DO, null);
OPTRecord optRecord = new OPTRecord(4096, 0, 0, Flags.DO);
query.addRecord(optRecord, Section.ADDITIONAL);
byte[] responseBytes = getRegistryDNS().generateReply(query, null);
Message response = new Message(responseBytes);
Expand Down Expand Up @@ -421,7 +421,7 @@ private List<Record> assertDNSQueryNotNull(
Name name = Name.fromString(lookup);
Record question = Record.newRecord(name, type, DClass.IN);
Message query = Message.newQuery(question);
OPTRecord optRecord = new OPTRecord(4096, 0, 0, Flags.DO, null);
OPTRecord optRecord = new OPTRecord(4096, 0, 0, Flags.DO);
query.addRecord(optRecord, Section.ADDITIONAL);
byte[] responseBytes = getRegistryDNS().generateReply(query, null);
Message response = new Message(responseBytes);
Expand Down Expand Up @@ -592,7 +592,7 @@ public void testReadMasterFile() throws Exception {
Name name = Name.fromString("5.0.17.172.in-addr.arpa.");
Record question = Record.newRecord(name, Type.PTR, DClass.IN);
Message query = Message.newQuery(question);
OPTRecord optRecord = new OPTRecord(4096, 0, 0, Flags.DO, null);
OPTRecord optRecord = new OPTRecord(4096, 0, 0, Flags.DO);
query.addRecord(optRecord, Section.ADDITIONAL);
byte[] responseBytes = getRegistryDNS().generateReply(query, null);
Message response = new Message(responseBytes);
Expand Down
2 changes: 1 addition & 1 deletion hadoop-project/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<zookeeper.version>3.8.4</zookeeper.version>
<curator.version>5.2.0</curator.version>
<findbugs.version>3.0.5</findbugs.version>
<dnsjava.version>3.4.0</dnsjava.version>
<dnsjava.version>3.6.1</dnsjava.version>

<guava.version>27.0-jre</guava.version>
<guice.version>5.1.0</guice.version>
Expand Down

0 comments on commit c593c17

Please sign in to comment.