You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Alexey Serbin (Code Review)" <ge...@cloudera.org> on 2022/10/19 23:48:40 UTC

[kudu-CR] [rpc] avoid crashes on malicious negotiation attempts

Alexey Serbin has uploaded this change for review. ( http://gerrit.cloudera.org:8080/19158


Change subject: [rpc] avoid crashes on malicious negotiation attempts
......................................................................

[rpc] avoid crashes on malicious negotiation attempts

This patch updates the code for RPC connection negotiation to change
from CHECK() to LOG(DFATAL) and Status::IllegalState() when checking on
some security constraint.  This narrows the attack vector of potential
DOS attacks for Kudu servers.

Change-Id: I416e3e952a3ee928ed6c51389227184c73a96b0b
---
M src/kudu/rpc/client_negotiation.cc
M src/kudu/rpc/client_negotiation.h
M src/kudu/rpc/server_negotiation.cc
3 files changed, 31 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/58/19158/1
-- 
To view, visit http://gerrit.cloudera.org:8080/19158
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I416e3e952a3ee928ed6c51389227184c73a96b0b
Gerrit-Change-Number: 19158
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>

[kudu-CR] [rpc] avoid crashes on malicious negotiation attempts

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/19158 )

Change subject: [rpc] avoid crashes on malicious negotiation attempts
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/19158/1/src/kudu/rpc/client_negotiation.h
File src/kudu/rpc/client_negotiation.h:

http://gerrit.cloudera.org:8080/#/c/19158/1/src/kudu/rpc/client_negotiation.h@39
PS1, Line 39: #include "kudu/security/token.pb.h"
> Maybe removing 'class SignedTokenPB;' will trigger IWYU to check this file.
Yes, Yingchun is right: IWYU pointed that this include is needed, so I just followed the recommendation.



-- 
To view, visit http://gerrit.cloudera.org:8080/19158
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I416e3e952a3ee928ed6c51389227184c73a96b0b
Gerrit-Change-Number: 19158
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <ac...@gmail.com>
Gerrit-Reviewer: Yuqi Du <sh...@gmail.com>
Gerrit-Comment-Date: Sat, 22 Oct 2022 15:56:32 +0000
Gerrit-HasComments: Yes

[kudu-CR] [rpc] avoid crashes on malicious negotiation attempts

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/19158 )

Change subject: [rpc] avoid crashes on malicious negotiation attempts
......................................................................

[rpc] avoid crashes on malicious negotiation attempts

This patch updates the code for RPC connection negotiation to change
from CHECK() to LOG(DFATAL) and Status::IllegalState() when checking on
some security constraint.  This narrows the attack vector of potential
DOS attacks for Kudu servers.

Change-Id: I416e3e952a3ee928ed6c51389227184c73a96b0b
Reviewed-on: http://gerrit.cloudera.org:8080/19158
Tested-by: Kudu Jenkins
Reviewed-by: Yuqi Du <sh...@gmail.com>
Reviewed-by: Yingchun Lai <ac...@gmail.com>
---
M src/kudu/rpc/client_negotiation.cc
M src/kudu/rpc/client_negotiation.h
M src/kudu/rpc/server_negotiation.cc
3 files changed, 31 insertions(+), 8 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Yuqi Du: Looks good to me, but someone else must approve
  Yingchun Lai: Looks good to me, approved

-- 
To view, visit http://gerrit.cloudera.org:8080/19158
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I416e3e952a3ee928ed6c51389227184c73a96b0b
Gerrit-Change-Number: 19158
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <ac...@gmail.com>
Gerrit-Reviewer: Yuqi Du <sh...@gmail.com>

[kudu-CR] [rpc] avoid crashes on malicious negotiation attempts

Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/19158 )

Change subject: [rpc] avoid crashes on malicious negotiation attempts
......................................................................


Patch Set 1: Code-Review+2

(1 comment)

http://gerrit.cloudera.org:8080/#/c/19158/1/src/kudu/rpc/client_negotiation.h
File src/kudu/rpc/client_negotiation.h:

http://gerrit.cloudera.org:8080/#/c/19158/1/src/kudu/rpc/client_negotiation.h@39
PS1, Line 39: #include "kudu/security/token.pb.h"
> Maybe the file's changes seem not necessary.
Maybe removing 'class SignedTokenPB;' will trigger IWYU to check this file.



-- 
To view, visit http://gerrit.cloudera.org:8080/19158
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I416e3e952a3ee928ed6c51389227184c73a96b0b
Gerrit-Change-Number: 19158
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <ac...@gmail.com>
Gerrit-Reviewer: Yuqi Du <sh...@gmail.com>
Gerrit-Comment-Date: Sat, 22 Oct 2022 10:41:23 +0000
Gerrit-HasComments: Yes

[kudu-CR] [rpc] avoid crashes on malicious negotiation attempts

Posted by "Yuqi Du (Code Review)" <ge...@cloudera.org>.
Yuqi Du has posted comments on this change. ( http://gerrit.cloudera.org:8080/19158 )

Change subject: [rpc] avoid crashes on malicious negotiation attempts
......................................................................


Patch Set 1: Code-Review+1

(1 comment)

LGTM.

http://gerrit.cloudera.org:8080/#/c/19158/1/src/kudu/rpc/client_negotiation.h
File src/kudu/rpc/client_negotiation.h:

http://gerrit.cloudera.org:8080/#/c/19158/1/src/kudu/rpc/client_negotiation.h@39
PS1, Line 39: #include "kudu/security/token.pb.h"
Maybe the file's changes seem not necessary.



-- 
To view, visit http://gerrit.cloudera.org:8080/19158
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I416e3e952a3ee928ed6c51389227184c73a96b0b
Gerrit-Change-Number: 19158
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yuqi Du <sh...@gmail.com>
Gerrit-Comment-Date: Thu, 20 Oct 2022 07:15:43 +0000
Gerrit-HasComments: Yes