Skip to content

BoringSSL FIPS is out of date  #28246

Closed
Closed

Description

@tyxia

Currently BoringSSL FIPS is using the version that was release at 2021-04-29 .

Therefore, some API are not available for example SSL_was_key_usage_invalid.

Activity

  1. added
    enhancementFeature requests. Not bugs or questions.
    triageIssue requires triage
    on Jul 5, 2023
  2. kyessenov commented on Jul 5, 2023

    @kyessenov
    Contributor

    I don't think it's that old. It looks to be 2021-04-29.

  3. kyessenov commented on Jul 5, 2023

    @kyessenov
    Contributor

    This is the last certification per https://boringssl.googlesource.com/boringssl/+/master/crypto/fipsmodule/FIPS.md. So I don't think we can update it to anything newer.

  4. tyxia commented on Jul 5, 2023

    @tyxia
    MemberAuthor

    Ok, this date should be updated then.

    Thanks good to know

  5. kyessenov commented on Jul 5, 2023

    @kyessenov
    Contributor

    @tyxia You're looking at an old commit.

  6. tyxia commented on Jul 5, 2023

    @tyxia
    MemberAuthor

    oops , you are right. The latest one is 2021-04-29

    Some latest API like SSL_was_key_usage_invalid still can not be used though. But I guess there is nothing can be updated at this moment.

  7. davidben commented on Jul 7, 2023

    @davidben
    Contributor

    Note that that doesn't mean Envoy can't use new APIs at all. Of course, if Envoy wishes to support such-and-such old BoringSSL in some builds, those builds will be unable to use newer BoringSSL features. But Envoy builds targeting more recent BoringSSL versions can use new features perfectly fine. You just gate the code behind a preprocessor check like #if BORINGSSL_API_VERSION >= .... That's BoringSSL's standard strategy for dealing with version skew.

    In particular, the API you mentioned was specifically added because someone on Google's Envoy team requested it to help manage a transition to enable this security check. Our expectation was that they would use it in Envoy quickly, using this standard version skew strategy, and not wait for Envoy's oldest supported version to move past it. I'm a little surprised to hear that's the impediment. Hopefully this comment clears up the situation and Envoy can now switch to following our BoringSSL's standard practices instead. Artificially waiting years before you can use new features does no one any good. :-)

    Please just ask if you run into issues like this in future. I'd been long puzzled why Envoy had taken to long to use the API we specifically added for you all! :-p

  8. tyxia commented on Jul 7, 2023

    @tyxia
    MemberAuthor

    @davidben Thanks for sharing the details and info!
    I just want to clarify one thing in case there is any misunderstanding: This API is now being used but not in FIPS mode like below:

    #ifndef BORINGSSL_FIPS
      // Increment the `was_key_usage_invalid_` stats to indicate the given cert would have triggered an
      // error but is allowed because the enforcement that rsa key usage and tls usage need to be
      // matched has been disabled.
      if (SSL_was_key_usage_invalid(ssl)) {
        stats_.was_key_usage_invalid_.inc();
      }
    #endif
    

    Regarding #if BORINGSSL_API_VERSION >= ... you mentioned, I think it won't be effective until version that Envoy is using is actually bumped? But it is the good generic approach to check in the code using API with this guard in the future

  9. davidben commented on Jul 7, 2023

    @davidben
    Contributor

    Ah okay. Yeah that works too. Using the number means it'll get picked up automatically as the BORINGSSL_FIPS build updates, and you can keep track of which ifdefs are old and can be retired.

  10. ggreenway commented on Jul 11, 2023

    @ggreenway
    Member

    We're already using the latest FIPS build as noted above; closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions