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

HBASE-25568 Upgrade Thrift jar to fix CVE-2020-13949 #2958

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@
import org.apache.hadoop.hbase.thrift2.generated.TResult;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.ClientUtils;
import org.apache.thrift.TConfiguration;
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.protocol.TProtocol;
import org.apache.thrift.transport.TFramedTransport;
import org.apache.thrift.transport.TSaslClientTransport;
import org.apache.thrift.transport.TSocket;
import org.apache.thrift.transport.TTransport;
import org.apache.thrift.transport.layered.TFramedTransport;
import org.apache.yetus.audience.InterfaceAudience;

@InterfaceAudience.Private
Expand Down Expand Up @@ -91,7 +92,7 @@ public void run() throws Exception {
int timeout = 10000;
boolean framed = false;

TTransport transport = new TSocket(host, port, timeout);
TTransport transport = new TSocket(new TConfiguration(), host, port, timeout);
if (framed) {
transport = new TFramedTransport(transport);
} else if (secure) {
Expand Down
4 changes: 2 additions & 2 deletions hbase-thrift/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,12 @@
<requireProperty>
<property>thrift.version</property>
<message>"The Thrift version must be specified."</message>
<regex>0\.13\.0</regex>
<regex>0\.14\.0</regex>
<regexMessage>
-
-
[FATAL] ==========================================================================================
[FATAL] HBase Thrift requires the thrift generator version 0.13.0.
[FATAL] HBase Thrift requires the thrift generator version 0.14.0.
[FATAL] Setting it to something else needs to be reviewed for wire and behavior compatibility.
[FATAL] ==========================================================================================
-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@
import org.apache.thrift.server.TServer;
import org.apache.thrift.server.TServlet;
import org.apache.thrift.server.TThreadedSelectorServer;
import org.apache.thrift.transport.TFramedTransport;
import org.apache.thrift.transport.TNonblockingServerSocket;
import org.apache.thrift.transport.TNonblockingServerTransport;
import org.apache.thrift.transport.TSaslServerTransport;
import org.apache.thrift.transport.TServerSocket;
import org.apache.thrift.transport.TServerTransport;
import org.apache.thrift.transport.TTransportFactory;
import org.apache.thrift.transport.layered.TFramedTransport;
import org.apache.yetus.audience.InterfaceAudience;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -481,7 +481,7 @@ protected void setupServer() throws Exception {
+ " doesn't work with framed transport yet");
}
transportFactory = new TFramedTransport.Factory(
conf.getInt(MAX_FRAME_SIZE_CONF_KEY, MAX_FRAME_SIZE_CONF_DEFAULT) * 1024 * 1024);
conf.getInt(MAX_FRAME_SIZE_CONF_KEY, MAX_FRAME_SIZE_CONF_DEFAULT) * 1024 * 1024);
LOG.debug("Using framed transport");
} else if (qop == null) {
transportFactory = new TTransportFactory();
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading