Re: ​Crash seen in tls13_enc API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 20/04/2023 07:47, Samiya Khanum via openssl-users wrote:
Hi Viktor,

Thanks for the response.
After removing "tls1_new" and "tls1_clear", I didn't see the crash.

Need some clarification..
The same code works fine with OpenSSL 1.0.2g  version. We have been using this api's in older versions also, it works fine. /"tls1_new"/ makes an /"ssl3_new"/ api call. SSLV3 is deprecated in openssl1.1.1 version.
Are we not supposed to use this api(tls1_new) in openssl1.1.1?

You were never supposed to make these calls in any version of OpenSSL. If it worked for you then it worked by accident. Those functions are purely internal and should never be called directly by an application.

Matt



Thanks in advance.

Regards,
Samiya khanum


On Thu, Apr 20, 2023 at 7:10 AM <openssl-users-request@xxxxxxxxxxx <mailto:openssl-users-request@xxxxxxxxxxx>> wrote:

    Send openssl-users mailing list submissions to
    openssl-users@xxxxxxxxxxx <mailto:openssl-users@xxxxxxxxxxx>

    To subscribe or unsubscribe via the World Wide Web, visit
    https://mta.openssl.org/mailman/listinfo/openssl-users
    <https://mta.openssl.org/mailman/listinfo/openssl-users>
    or, via email, send a message with subject or body 'help' to
    openssl-users-request@xxxxxxxxxxx
    <mailto:openssl-users-request@xxxxxxxxxxx>

    You can reach the person managing the list at
    openssl-users-owner@xxxxxxxxxxx <mailto:openssl-users-owner@xxxxxxxxxxx>

    When replying, please edit your Subject line so it is more specific
    than "Re: Contents of openssl-users digest..."


    Today's Topics:

        1. Re: Crash seen in tls13_enc API (Viktor Dukhovni)
        2. Re: OpenSSL seeks feedback on draft mission & values
           statement (Christian Heinrich)
        3. Re: RAND_Bytes() failed with RAND_R_ERROR_INSTANTIATING_DRBG
           (Dr Paul Dale)
        4. Re: OpenSSL 3.0.x + Python 3.9.x + Enable FIPS- Need
           help/inputs (Dr Paul Dale)


    ----------------------------------------------------------------------

    Message: 1
    Date: Wed, 19 Apr 2023 19:02:16 -0400
    From: Viktor Dukhovni <openssl-users@xxxxxxxxxxxx
    <mailto:openssl-users@xxxxxxxxxxxx>>
    To: openssl-users@xxxxxxxxxxx <mailto:openssl-users@xxxxxxxxxxx>
    Subject: Re: Crash seen in tls13_enc API
    Message-ID: <ZEBy-GeML2X8oLi5@xxxxxxxxxxxxxxxxxxx
    <mailto:ZEBy-GeML2X8oLi5@xxxxxxxxxxxxxxxxxxx>>
    Content-Type: text/plain; charset=us-ascii

    On Thu, Apr 20, 2023 at 12:20:16AM +0530, Samiya Khanum via
    openssl-users wrote:

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

    What is "tls1_new"?  This does not look like a public OpenSSL API call.

     > *  err = SSL_connect(con);*
     > *  if(err == -1)*
     > *  {*
     > *    tls1_clear(con);*

    And what is tls1_clear()?  Perhaps if you simply delete both calls,
    things will start to work.

--     Viktor.


    ------------------------------

    Message: 2
    Date: Thu, 20 Apr 2023 10:52:11 +0930
    From: Christian Heinrich <christian.heinrich@xxxxxxxxxx
    <mailto:christian.heinrich@xxxxxxxxxx>>
    To: Hugo Landau <hlandau@xxxxxxxxxxx <mailto:hlandau@xxxxxxxxxxx>>
    Cc: openssl-project@xxxxxxxxxxx
    <mailto:openssl-project@xxxxxxxxxxx>, openssl-users@xxxxxxxxxxx
    <mailto:openssl-users@xxxxxxxxxxx>
    Subject: Re: OpenSSL seeks feedback on draft mission & values
             statement
    Message-ID:
<CAGKxTUROfvVh5RVKp1Si_KMfNCYbZjhBAUJwqF-oCDRz64-19Q@xxxxxxxxxxxxxx
    <mailto:CAGKxTUROfvVh5RVKp1Si_KMfNCYbZjhBAUJwqF-oCDRz64-19Q@xxxxxxxxxxxxxx>>
    Content-Type: text/plain; charset="UTF-8"

    Hugo,

    On Fri, 31 Mar 2023 at 20:09, Hugo Landau <hlandau@xxxxxxxxxxx
    <mailto:hlandau@xxxxxxxxxxx>> wrote:
     > For further information on the draft mission & values statement and
     > details on how to submit feedback, please see:

    Just an additional point that wasn't appropriate for the feedback form.

    Can you include a statement that clarifies the position on export
    restrictions in light of the fact OpenSSL is widely available and
    therefore does not strictly apply in most cases?


    --
    Regards,
    Christian Heinrich

    http://cmlh.id.au/contact <http://cmlh.id.au/contact>


    ------------------------------

    Message: 3
    Date: Thu, 20 Apr 2023 11:33:18 +1000
    From: Dr Paul Dale <pauli@xxxxxxxxxxx <mailto:pauli@xxxxxxxxxxx>>
    To: openssl-users@xxxxxxxxxxx <mailto:openssl-users@xxxxxxxxxxx>
    Subject: Re: RAND_Bytes() failed with RAND_R_ERROR_INSTANTIATING_DRBG
    Message-ID: <4bfa0629-e010-9335-4241-a92b07b5f9af@xxxxxxxxxxx
    <mailto:4bfa0629-e010-9335-4241-a92b07b5f9af@xxxxxxxxxxx>>
    Content-Type: text/plain; charset=UTF-8; format=flowed

    My guess would be /dev/random is waiting to be seeded.? 3.0 waits for
    the operating system to have decent entropy.? 1.1.1 will run without
    (which is rather bad).

    You might be able to run one of the entropy gathering daemons.? CPU
    Jitter is my usual recommendation but there are others.


    Paul Dale


    On 18/4/23 05:11, Manish Patel via openssl-users wrote:
     > Hi,
     >
     >  ? I am trying to upgrade openssl-1.1.1c with openssl-3.0.8.
     > We have an existing code that calls RAND_Bytes() which
     > now fails with above error code:
    [error:1200006C:lib(36)::reason(108)]
     >
     > Tracing
     > RAND_bytes_ex()
     > seed_src_generate()
     > ossl_pool_acquire_entropy() <- this returns no entropy.
     >
     > The pool->len is always zero.
     > I do not see ossl_rand_pool_add() or ossl_rand_pool_add_begin()
     > ever called.
     >
     > What am I missing? Looks like the random code in openssl has changed
     > significantly but can not figure out what do I need to do for the
     > entropy pool
     > to kick start.
     >
     > Any help is appreciated.
     >
     > Thank you
     > Manish.
     >
     >
     >



    ------------------------------

    Message: 4
    Date: Thu, 20 Apr 2023 11:39:37 +1000
    From: Dr Paul Dale <pauli@xxxxxxxxxxx <mailto:pauli@xxxxxxxxxxx>>
    To: "Prasad, PCRaghavendra" <Pcraghavendra.Prasad@xxxxxxxx
    <mailto:Pcraghavendra.Prasad@xxxxxxxx>>,
             "openssl-users@xxxxxxxxxxx
    <mailto:openssl-users@xxxxxxxxxxx>" <openssl-users@xxxxxxxxxxx
    <mailto:openssl-users@xxxxxxxxxxx>>
    Cc: "Ds, Pradeep Kumar" <PradeepKumar.Ds@xxxxxxxx>
    Subject: Re: OpenSSL 3.0.x + Python 3.9.x + Enable FIPS- Need
             help/inputs
    Message-ID: <5b7134db-07ad-c1b0-89cc-2639c4e1c6d5@xxxxxxxxxxx
    <mailto:5b7134db-07ad-c1b0-89cc-2639c4e1c6d5@xxxxxxxxxxx>>
    Content-Type: text/plain; charset="utf-8"; Format="flowed"

    It looks like you're trying to access non-approved crypto.? My
    suggestion would be to create a new library context specifically for
    this using OSSL_LIB_CTX_new().? Load only the default provider into
    that
    context using OSSL_PROVIDER_load().? Do not call
    EVP_default_properties_enable_fips() on it.

    You should only use this new library context for non-FIPS operations.?
    If there is any doubt about what is permitted and what isn't, contact
    your FIPS lab for clarification.

    Paul Dale

    On 20/4/23 01:35, Prasad, PCRaghavendra wrote:
     >
     > Hi Dr.Paul/Team,
     >
     > Good Morning,
     >
     > We have integrated OpenSSL 3.0.8 in our code along with fips
     > enablement. We are using python 3.11 version.
     >
     > We have used the default search path as our application directory
     > (OSSL_PROVIDER_set_default_search_path) and loaded the ?base? and
     > ?fips? providers and not the default provider.
     >
     > OSSL_PROVIDER_load(None, b"base")
     >
     > OSSL_PROVIDER_load(None, b"fips")
     >
     > After that, we enabled the FIPS using
     > libcrypto.EVP_default_properties_enable_fips() call.
     >
     > Should we load the default provider as well or base and fips are
    good
     > enough?
     >
     > Sometimes we are getting the below error message from Python
     > cryptography package
     >
     > cryptography.exceptions.InternalError: Unknown OpenSSL error. This
     > error is commonly encountered when another library is not
    cleaning up
     > the OpenSSL error stack. If you are using cryptography with another
     > library that uses OpenSSL try disabling it before reporting a bug.
     > Otherwise please file an issue at
     > https://github.com/pyca/cryptography/issues
    <https://github.com/pyca/cryptography/issues> with information on
    how to
     > reproduce this. ([_OpenSSLErrorWithText(code=50856204, lib=6,
     > reason=524556, reason_text=b'error:0308010C:digital envelope
     > routines::unsupported')])
     >
     > This error is intermittent is what we are observing as we have
    already
     > tested the complete application couple of times
     >
     > Any thoughts or inputs on this please will help us in debugging more
     > on this issue.
     >
     > Thanks,
     >
     > Raghavendra
     >
     > Internal Use - Confidential
     >
     > *From:* Dr Paul Dale <pauli@xxxxxxxxxxx <mailto:pauli@xxxxxxxxxxx>>
     > *Sent:* Wednesday, March 8, 2023 11:02 AM
     > *To:* Prasad, PCRaghavendra; openssl-users@xxxxxxxxxxx
    <mailto:openssl-users@xxxxxxxxxxx>
     > *Cc:* Ds, Pradeep Kumar; Kuppam, Pradeep; Kappgal, Srinath
     > *Subject:* Re: OpenSSL 3.0.x + Python 3.9.x + Enable FIPS- Need
     > help/inputs
     >
     > [EXTERNAL EMAIL]
     >
     >     Are there any specific .h files where we can refer to this method
     >     that needs to be used ( ex: evp.h )?
     >
     >
     > #include "openssl/evp.h" should be enough to get the EVP APIs.? You
     > will need other includes for other parts of OpenSSL but that covers
     > EVP well enough.
     >
     >
     >     still, are there any files that we can go through once before
     >     calling in the fips mode?
     >
     >
     > Turn on -Wdeprecated or equivalent in your compile and the low level
     > calls will be flagged.? They should all be deprecated.
     >
     >
     >     One more doubt is How can we set fips enabled for the complete
     >     application (process/service) while running so that if we are
     >     using non-compliant algorithms/methods it should throw errors? Is
     >     it possible in OpenSSL 3.0.x?
     >
     >
     > The call you are looking for is:
     >
     > EVP_set_default_properties(libctx, "fips=yes");
     >
     > I strongly suggest reading the documentation about the FIPS provider
     > [openssl.org <http://openssl.org>]
     >
    <https://urldefense.com/v3/__https:/www.openssl.org/docs/man3.0/man7/fips_module.html__;!!LpKI!gwsGt_60jqaHzhWTEXZCwSn0frcRAuJbbxYQLrkbfBfkw9-Eg_mdOnYzU6EDHNOBOR25XSXKcqHcPO1X7_TtGA$ <https://urldefense.com/v3/__https:/www.openssl.org/docs/man3.0/man7/fips_module.html__;!!LpKI!gwsGt_60jqaHzhWTEXZCwSn0frcRAuJbbxYQLrkbfBfkw9-Eg_mdOnYzU6EDHNOBOR25XSXKcqHcPO1X7_TtGA$>>
     > and the migration guide [openssl.org <http://openssl.org>]
     >
    <https://urldefense.com/v3/__https:/www.openssl.org/docs/man3.0/man7/migration_guide.html__;!!LpKI!gwsGt_60jqaHzhWTEXZCwSn0frcRAuJbbxYQLrkbfBfkw9-Eg_mdOnYzU6EDHNOBOR25XSXKcqHcPO2zYsa_AA$ <https://urldefense.com/v3/__https:/www.openssl.org/docs/man3.0/man7/migration_guide.html__;!!LpKI!gwsGt_60jqaHzhWTEXZCwSn0frcRAuJbbxYQLrkbfBfkw9-Eg_mdOnYzU6EDHNOBOR25XSXKcqHcPO2zYsa_AA$>>.?
     > Both the avoidance of low level calls and setting the default
     > properties are covered therein.? There are a number of other nuances
     > to trip over when using the FIPS provider.
     >
     >
     > Paul Dale
     >
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL:
    <https://mta.openssl.org/pipermail/openssl-users/attachments/20230420/d4a3c48a/attachment.htm <https://mta.openssl.org/pipermail/openssl-users/attachments/20230420/d4a3c48a/attachment.htm>>

    ------------------------------

    Subject: Digest Footer

    _______________________________________________
    openssl-users mailing list
    openssl-users@xxxxxxxxxxx <mailto:openssl-users@xxxxxxxxxxx>
    https://mta.openssl.org/mailman/listinfo/openssl-users
    <https://mta.openssl.org/mailman/listinfo/openssl-users>


    ------------------------------

    End of openssl-users Digest, Vol 101, Issue 30
    **********************************************


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.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux