Alexey Serbin has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/19292 )

Change subject: [jwt] proper memory ownership for RSA key components
......................................................................

[jwt] proper memory ownership for RSA key components

This patch corrects the ownership for RSA key's module and exponent in
RSAJWTPublicKeyBuilder::ConvertJwkToPem() for OpenSSL versions prior
to 1.1.0.  Prior to this patch, jwt-util-test would crash with SIGSEGV
if compiled and run against earlier OpenSSL versions (e.g. 1.0.1)

*** SIGSEGV (@0x1e800002) received by PID 31969 (TID 0x7f07a0ae5940) from PID 
511705090; stack trace: ***
    ...
    @       0x3ae366ad5d CRYPTO_free at ??:0
    @       0x3ae36a6ef5 BN_free at ??:0
    @     0x7f07a9a44d85 std::_Function_handler<>::_M_invoke() at ??:0
    @     0x7f07a9a4571d std::function<>::operator()() at ??:0
    @     0x7f07a99f42ac std::unique_ptr<>::~unique_ptr() at ??:0
    @     0x7f07a99e6cfa kudu::RSAJWTPublicKeyBuilder::ConvertJwkToPem() at ??:0
    @     0x7f07a99e5910 kudu::RSAJWTPublicKeyBuilder::CreateJWKPublicKey() at 
??:0
    ...

Change-Id: Ib94122eb7221c99ed4997b456cdcea4cd6d5154b
Reviewed-on: http://gerrit.cloudera.org:8080/19292
Tested-by: Kudu Jenkins
Reviewed-by: Zoltan Chovan <[email protected]>
Reviewed-by: Attila Bukor <[email protected]>
---
M src/kudu/util/jwt-util.cc
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Zoltan Chovan: Looks good to me, but someone else must approve
  Attila Bukor: Looks good to me, approved

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib94122eb7221c99ed4997b456cdcea4cd6d5154b
Gerrit-Change-Number: 19292
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Attila Bukor <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Zoltan Chovan <[email protected]>

Reply via email to