Crash seen in tls13_enc API

Samiya Khanum samiya.khanum at broadcom.com
Wed Apr 19 18:50:16 UTC 2023


Hi All,

We are seeing a crash in the code below with OpenSSL 1.1.1l  version.
../../../../vendor/openssl/ssl/record/ssl3_record_tls13.c:87: OpenSSL
internal error: Assertion failed: s->s3->tmp.new_cipher != NULL

TLS connection is successful, but when "SSL_shutdown"  is initiated a crash
is seen.
Do we need to set a cipher list in this code?

something like this?
"SSL_CTX_set_cipher_list(ssl_ctx, (char *) "DEFAULT")"

Am I missing something?

*Below is the code for TLS connection:*

 *ctx=SSL_CTX_new(TLS_method());*
* if (ctx == NULL)*
* {*
*    SocketClose(sd);*
*    return FAILURE;*
*  }*

*  con=SSL_new(ctx);*
*  if(con == NULL)*
*  {*
*    SSL_CTX_free(ctx);*
*    SocketClose(sd);*
*    return FAILURE;*
*  }*

*  SSL_set_fd (con, sd);*

*  if(tls1_new(con) != 1)*
*  {*
*    SSL_shutdown(con);*
*    SSL_free(con);*
*    SocketClose(sd);*
*    return FAILURE;*
*  }*

*  err = SSL_connect(con);*
*  if(err == -1)*
*  {*
*    tls1_clear(con);*
*    SSL_shutdown(con);*
*    SSL_free(con);*
*    SocketClose(sd);*
*    return FAILURE;*
*  }*

*   printf("TLS CONNECTION IS SUCCESSFUL");*
*   /* Data send and receive */*

*   /* Close the connection */*
*   if (con != NULL)*
*   {*
*     tls1_clear(con);*
*    /* CRASH is seen when SSL_shutdown is called */*
*     SSL_shutdown(con);*
*     SSL_free(con);*
*   }*


Thanks & Regards,
Samiya khanum

-- 
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20230420/891333f2/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4212 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20230420/891333f2/attachment-0001.p7s>


More information about the openssl-users mailing list