[Touch-packages] [Bug 2056593] Re: [FFE] FIPS compatibility patches

2024-03-28 Thread Launchpad Bug Tracker
This bug was fixed in the package openssl - 3.0.13-0ubuntu2

---
openssl (3.0.13-0ubuntu2) noble; urgency=medium

  [ Tobias Heider ]
  * Add fips-mode detection and adjust defaults when running in fips mode
(LP: #2056593):
- d/p/fips/crypto-Add-kernel-FIPS-mode-detection.patch:
  Detect if kernel fips mode is enabled
- d/p/fips/crypto-Automatically-use-the-FIPS-provider-when-the-kerne.patch:
  Load FIPS provider if running in FIPS mode
- d/p/fips/apps-speed-Omit-unavailable-algorithms-in-FIPS-mode.patch:
  Limit openssl-speed to FIPS compliant algorithms when running in FIPS mode
- d/p/fips/apps-pass-propquery-arg-to-the-libctx-DRBG-fetches.patch
  Make sure DRBG respects query properties
- d/p/fips/test-Ensure-encoding-runs-with-the-correct-context-during.patch:
  Make sure encoding runs with correct library context and provider

  [ Adrien Nader ]
  * Re-enable intel/0002-AES-GCM-enabled-with-AVX512-vAES-and-vPCLMULQDQ.patch
(LP: #2030784)
Thanks Bun K Tan and Dan Zimmerman
  * Disable LTO with which the codebase is generally incompatible (LP: #2058017)

 -- Adrien Nader   Fri, 15 Mar 2024 09:46:33
+0100

** Changed in: openssl (Ubuntu)
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to openssl in Ubuntu.
https://bugs.launchpad.net/bugs/2056593

Title:
  [FFE] FIPS compatibility patches

Status in openssl package in Ubuntu:
  Fix Released

Bug description:
  We have an open MR with a handful of FIPS compatibilty changes we wore hoping
  to get into 24.04. The main purpose of the changes is to detect whether the
  kernel is running in FIPS mode and adjust the behavior of the library
  accordingly by loading the correct provider backend and using defaults that
  are FIPS compliant (no md5, DES etc) instead trying to use non-compliant code
  paths and crashing.

  The proposed patches were taken from the OpenSSL version shipped in the FIPS
  archive at esm.ubuntu.com for 22.04. Having them in the regular archive will
  reduce the maintenance work significantly. None of the changes should have any
  impact on running OpenSSL in regular (non-fips) mode.

  Below is a detailed list of the changes:

  - d/p/fips/crypto-Add-kernel-FIPS-mode-detection.patch:
    This adds a new internal API to determine whether the kernel has been booted
    in FIPS mode. This can be overridden with the OPENSSL_FORCE_FIPS_MODE
    environment variable. OPENSSL_FIPS_MODE_SWITCH_PATH can be used to specify 
an
    alternative path for the fips_enabled file and is used in tests.
    The FIPS_MODULE switch can be used to enable build of the the FIPS provider
    module specific parts which are not needed in the OpenSSL library itself.

  - d/p/fips/crypto-Automatically-use-the-FIPS-provider-when-the-kerne.patch:
    This automatically configures all library contexts to use the FIPS provider 
when
    the kernel is booted in FIPS mode by:
    - Setting "fips=yes" as the default property for algorithm fetches
    - Loading and activating the FIPS provider as the fallback provider.

    If applications load providers via a configuration either because the 
default
    configuration is modified or they override the default configuration, this
    disables loading of the fallback providers. In this case, the configuration
    must load the FIPS provider when FIPS mode is enabled, else algorithm 
fetches
    will fail

    Applications can choose to use non-FIPS approved algorithms by specifying 
the
    "-fips" or "fips=no" property for algorithm fetches and loading the default
    provider.

  - d/p/fips/apps-speed-Omit-unavailable-algorithms-in-FIPS-mode.patch:
    Omit unavailable algorithms in FIPS mode

  - d/p/fips/apps-pass-propquery-arg-to-the-libctx-DRBG-fetches.patch
    The -propquery argument might be used to define a preference for which 
provider
    an algorithm is fetched from. Set the query properties for the library 
context
    DRBG fetches as well so that they are fetched with the same properties.

  - d/p/fips/test-Ensure-encoding-runs-with-the-correct-context-during.patch:
    This test uses 2 library contexts - one context for creating initial test 
keys,
    and then another context (or the default context) for running tests. There 
is an
    issue that during the encoding tests, the OSSL_ENCODER_CTX is created from 
the
    created EVP_PKEYs, which are associated with the library context used to 
create
    the keys. This means that encoding tests run with the wrong library context,
    which always uses the default provider.

  These changes are now included in a larger MR with other changes in
  the same package version:
  
https://code.launchpad.net/~adrien-n/ubuntu/+source/openssl/+git/openssl/+merge/462486

  The now-superseded MR is at
  
https://code.launchpad.net/~tobhe/ubuntu/+source/openssl/+git/openssl/+merge/460953

  Since 

[Touch-packages] [Bug 2056593] Re: [FFE] FIPS compatibility patches

2024-03-18 Thread Adrien Nader
** Changed in: openssl (Ubuntu)
   Status: Triaged => Fix Committed

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to openssl in Ubuntu.
https://bugs.launchpad.net/bugs/2056593

Title:
  [FFE] FIPS compatibility patches

Status in openssl package in Ubuntu:
  Fix Committed

Bug description:
  We have an open MR with a handful of FIPS compatibilty changes we wore hoping
  to get into 24.04. The main purpose of the changes is to detect whether the
  kernel is running in FIPS mode and adjust the behavior of the library
  accordingly by loading the correct provider backend and using defaults that
  are FIPS compliant (no md5, DES etc) instead trying to use non-compliant code
  paths and crashing.

  The proposed patches were taken from the OpenSSL version shipped in the FIPS
  archive at esm.ubuntu.com for 22.04. Having them in the regular archive will
  reduce the maintenance work significantly. None of the changes should have any
  impact on running OpenSSL in regular (non-fips) mode.

  Below is a detailed list of the changes:

  - d/p/fips/crypto-Add-kernel-FIPS-mode-detection.patch:
    This adds a new internal API to determine whether the kernel has been booted
    in FIPS mode. This can be overridden with the OPENSSL_FORCE_FIPS_MODE
    environment variable. OPENSSL_FIPS_MODE_SWITCH_PATH can be used to specify 
an
    alternative path for the fips_enabled file and is used in tests.
    The FIPS_MODULE switch can be used to enable build of the the FIPS provider
    module specific parts which are not needed in the OpenSSL library itself.

  - d/p/fips/crypto-Automatically-use-the-FIPS-provider-when-the-kerne.patch:
    This automatically configures all library contexts to use the FIPS provider 
when
    the kernel is booted in FIPS mode by:
    - Setting "fips=yes" as the default property for algorithm fetches
    - Loading and activating the FIPS provider as the fallback provider.

    If applications load providers via a configuration either because the 
default
    configuration is modified or they override the default configuration, this
    disables loading of the fallback providers. In this case, the configuration
    must load the FIPS provider when FIPS mode is enabled, else algorithm 
fetches
    will fail

    Applications can choose to use non-FIPS approved algorithms by specifying 
the
    "-fips" or "fips=no" property for algorithm fetches and loading the default
    provider.

  - d/p/fips/apps-speed-Omit-unavailable-algorithms-in-FIPS-mode.patch:
    Omit unavailable algorithms in FIPS mode

  - d/p/fips/apps-pass-propquery-arg-to-the-libctx-DRBG-fetches.patch
    The -propquery argument might be used to define a preference for which 
provider
    an algorithm is fetched from. Set the query properties for the library 
context
    DRBG fetches as well so that they are fetched with the same properties.

  - d/p/fips/test-Ensure-encoding-runs-with-the-correct-context-during.patch:
    This test uses 2 library contexts - one context for creating initial test 
keys,
    and then another context (or the default context) for running tests. There 
is an
    issue that during the encoding tests, the OSSL_ENCODER_CTX is created from 
the
    created EVP_PKEYs, which are associated with the library context used to 
create
    the keys. This means that encoding tests run with the wrong library context,
    which always uses the default provider.

  These changes are now included in a larger MR with other changes in
  the same package version:
  
https://code.launchpad.net/~adrien-n/ubuntu/+source/openssl/+git/openssl/+merge/462486

  The now-superseded MR is at
  
https://code.launchpad.net/~tobhe/ubuntu/+source/openssl/+git/openssl/+merge/460953

  Since OpenSSL just received another big update to 3.0.13 we had to rebase our 
changes
  and will have to rerun our install/upgrade tests.

  A test build is also available at
  https://launchpad.net/~tobhe/+archive/ubuntu/openssl-test/

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/2056593/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 2056593] Re: [FFE] FIPS compatibility patches

2024-03-15 Thread Graham Inggs
FFe granted.


** Changed in: openssl (Ubuntu)
   Status: New => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to openssl in Ubuntu.
https://bugs.launchpad.net/bugs/2056593

Title:
  [FFE] FIPS compatibility patches

Status in openssl package in Ubuntu:
  Triaged

Bug description:
  We have an open MR with a handful of FIPS compatibilty changes we wore hoping
  to get into 24.04. The main purpose of the changes is to detect whether the
  kernel is running in FIPS mode and adjust the behavior of the library
  accordingly by loading the correct provider backend and using defaults that
  are FIPS compliant (no md5, DES etc) instead trying to use non-compliant code
  paths and crashing.

  The proposed patches were taken from the OpenSSL version shipped in the FIPS
  archive at esm.ubuntu.com for 22.04. Having them in the regular archive will
  reduce the maintenance work significantly. None of the changes should have any
  impact on running OpenSSL in regular (non-fips) mode.

  Below is a detailed list of the changes:

  - d/p/fips/crypto-Add-kernel-FIPS-mode-detection.patch:
    This adds a new internal API to determine whether the kernel has been booted
    in FIPS mode. This can be overridden with the OPENSSL_FORCE_FIPS_MODE
    environment variable. OPENSSL_FIPS_MODE_SWITCH_PATH can be used to specify 
an
    alternative path for the fips_enabled file and is used in tests.
    The FIPS_MODULE switch can be used to enable build of the the FIPS provider
    module specific parts which are not needed in the OpenSSL library itself.

  - d/p/fips/crypto-Automatically-use-the-FIPS-provider-when-the-kerne.patch:
    This automatically configures all library contexts to use the FIPS provider 
when
    the kernel is booted in FIPS mode by:
    - Setting "fips=yes" as the default property for algorithm fetches
    - Loading and activating the FIPS provider as the fallback provider.

    If applications load providers via a configuration either because the 
default
    configuration is modified or they override the default configuration, this
    disables loading of the fallback providers. In this case, the configuration
    must load the FIPS provider when FIPS mode is enabled, else algorithm 
fetches
    will fail

    Applications can choose to use non-FIPS approved algorithms by specifying 
the
    "-fips" or "fips=no" property for algorithm fetches and loading the default
    provider.

  - d/p/fips/apps-speed-Omit-unavailable-algorithms-in-FIPS-mode.patch:
    Omit unavailable algorithms in FIPS mode

  - d/p/fips/apps-pass-propquery-arg-to-the-libctx-DRBG-fetches.patch
    The -propquery argument might be used to define a preference for which 
provider
    an algorithm is fetched from. Set the query properties for the library 
context
    DRBG fetches as well so that they are fetched with the same properties.

  - d/p/fips/test-Ensure-encoding-runs-with-the-correct-context-during.patch:
    This test uses 2 library contexts - one context for creating initial test 
keys,
    and then another context (or the default context) for running tests. There 
is an
    issue that during the encoding tests, the OSSL_ENCODER_CTX is created from 
the
    created EVP_PKEYs, which are associated with the library context used to 
create
    the keys. This means that encoding tests run with the wrong library context,
    which always uses the default provider.

  These changes are now included in a larger MR with other changes in
  the same package version:
  
https://code.launchpad.net/~adrien-n/ubuntu/+source/openssl/+git/openssl/+merge/462486

  The now-superseded MR is at
  
https://code.launchpad.net/~tobhe/ubuntu/+source/openssl/+git/openssl/+merge/460953

  Since OpenSSL just received another big update to 3.0.13 we had to rebase our 
changes
  and will have to rerun our install/upgrade tests.

  A test build is also available at
  https://launchpad.net/~tobhe/+archive/ubuntu/openssl-test/

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/2056593/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 2056593] Re: [FFE] FIPS compatibility patches

2024-03-15 Thread Adrien Nader
** Description changed:

  We have an open MR with a handful of FIPS compatibilty changes we wore hoping
  to get into 24.04. The main purpose of the changes is to detect whether the
  kernel is running in FIPS mode and adjust the behavior of the library
  accordingly by loading the correct provider backend and using defaults that
  are FIPS compliant (no md5, DES etc) instead trying to use non-compliant code
  paths and crashing.
  
  The proposed patches were taken from the OpenSSL version shipped in the FIPS
  archive at esm.ubuntu.com for 22.04. Having them in the regular archive will
  reduce the maintenance work significantly. None of the changes should have any
  impact on running OpenSSL in regular (non-fips) mode.
  
  Below is a detailed list of the changes:
  
  - d/p/fips/crypto-Add-kernel-FIPS-mode-detection.patch:
-   This adds a new internal API to determine whether the kernel has been booted
-   in FIPS mode. This can be overridden with the OPENSSL_FORCE_FIPS_MODE
-   environment variable. OPENSSL_FIPS_MODE_SWITCH_PATH can be used to specify 
an
-   alternative path for the fips_enabled file and is used in tests.
-   The FIPS_MODULE switch can be used to enable build of the the FIPS provider
-   module specific parts which are not needed in the OpenSSL library itself.
+   This adds a new internal API to determine whether the kernel has been booted
+   in FIPS mode. This can be overridden with the OPENSSL_FORCE_FIPS_MODE
+   environment variable. OPENSSL_FIPS_MODE_SWITCH_PATH can be used to specify 
an
+   alternative path for the fips_enabled file and is used in tests.
+   The FIPS_MODULE switch can be used to enable build of the the FIPS provider
+   module specific parts which are not needed in the OpenSSL library itself.
  
  - d/p/fips/crypto-Automatically-use-the-FIPS-provider-when-the-kerne.patch:
-   This automatically configures all library contexts to use the FIPS provider 
when
-   the kernel is booted in FIPS mode by:
-   - Setting "fips=yes" as the default property for algorithm fetches
-   - Loading and activating the FIPS provider as the fallback provider.
+   This automatically configures all library contexts to use the FIPS provider 
when
+   the kernel is booted in FIPS mode by:
+   - Setting "fips=yes" as the default property for algorithm fetches
+   - Loading and activating the FIPS provider as the fallback provider.
  
-   If applications load providers via a configuration either because the 
default
-   configuration is modified or they override the default configuration, this
-   disables loading of the fallback providers. In this case, the configuration
-   must load the FIPS provider when FIPS mode is enabled, else algorithm 
fetches
-   will fail
+   If applications load providers via a configuration either because the 
default
+   configuration is modified or they override the default configuration, this
+   disables loading of the fallback providers. In this case, the configuration
+   must load the FIPS provider when FIPS mode is enabled, else algorithm 
fetches
+   will fail
  
-   Applications can choose to use non-FIPS approved algorithms by specifying 
the
-   "-fips" or "fips=no" property for algorithm fetches and loading the default
-   provider.
+   Applications can choose to use non-FIPS approved algorithms by specifying 
the
+   "-fips" or "fips=no" property for algorithm fetches and loading the default
+   provider.
  
  - d/p/fips/apps-speed-Omit-unavailable-algorithms-in-FIPS-mode.patch:
-   Omit unavailable algorithms in FIPS mode
+   Omit unavailable algorithms in FIPS mode
  
  - d/p/fips/apps-pass-propquery-arg-to-the-libctx-DRBG-fetches.patch
-   The -propquery argument might be used to define a preference for which 
provider
-   an algorithm is fetched from. Set the query properties for the library 
context
-   DRBG fetches as well so that they are fetched with the same properties.
+   The -propquery argument might be used to define a preference for which 
provider
+   an algorithm is fetched from. Set the query properties for the library 
context
+   DRBG fetches as well so that they are fetched with the same properties.
  
  - d/p/fips/test-Ensure-encoding-runs-with-the-correct-context-during.patch:
-   This test uses 2 library contexts - one context for creating initial test 
keys,
-   and then another context (or the default context) for running tests. There 
is an
-   issue that during the encoding tests, the OSSL_ENCODER_CTX is created from 
the
-   created EVP_PKEYs, which are associated with the library context used to 
create
-   the keys. This means that encoding tests run with the wrong library context,
-   which always uses the default provider.
+   This test uses 2 library contexts - one context for creating initial test 
keys,
+   and then another context (or the default context) for running tests. There 
is an
+   issue that during the encoding tests, the OSSL_ENCODER_CTX is created from 
the
+   created EVP_PKEYs, which are 

[Touch-packages] [Bug 2056593] Re: [FFE] FIPS compatibility patches

2024-03-15 Thread Adrien Nader
I did some additional tests too in a noble container.

With/without the env var to set the file location, including with the
file missing, with/without the env var to force FIPS mode, and using
values 0, 1, 42, -42, a.

By the way, note that access to these environment variables uses
secure_getenv().

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to openssl in Ubuntu.
https://bugs.launchpad.net/bugs/2056593

Title:
  [FFE] FIPS compatibility patches

Status in openssl package in Ubuntu:
  New

Bug description:
  We have an open MR with a handful of FIPS compatibilty changes we wore hoping
  to get into 24.04. The main purpose of the changes is to detect whether the
  kernel is running in FIPS mode and adjust the behavior of the library
  accordingly by loading the correct provider backend and using defaults that
  are FIPS compliant (no md5, DES etc) instead trying to use non-compliant code
  paths and crashing.

  The proposed patches were taken from the OpenSSL version shipped in the FIPS
  archive at esm.ubuntu.com for 22.04. Having them in the regular archive will
  reduce the maintenance work significantly. None of the changes should have any
  impact on running OpenSSL in regular (non-fips) mode.

  Below is a detailed list of the changes:

  - d/p/fips/crypto-Add-kernel-FIPS-mode-detection.patch:
    This adds a new internal API to determine whether the kernel has been booted
    in FIPS mode. This can be overridden with the OPENSSL_FORCE_FIPS_MODE
    environment variable. OPENSSL_FIPS_MODE_SWITCH_PATH can be used to specify 
an
    alternative path for the fips_enabled file and is used in tests.
    The FIPS_MODULE switch can be used to enable build of the the FIPS provider
    module specific parts which are not needed in the OpenSSL library itself.

  - d/p/fips/crypto-Automatically-use-the-FIPS-provider-when-the-kerne.patch:
    This automatically configures all library contexts to use the FIPS provider 
when
    the kernel is booted in FIPS mode by:
    - Setting "fips=yes" as the default property for algorithm fetches
    - Loading and activating the FIPS provider as the fallback provider.

    If applications load providers via a configuration either because the 
default
    configuration is modified or they override the default configuration, this
    disables loading of the fallback providers. In this case, the configuration
    must load the FIPS provider when FIPS mode is enabled, else algorithm 
fetches
    will fail

    Applications can choose to use non-FIPS approved algorithms by specifying 
the
    "-fips" or "fips=no" property for algorithm fetches and loading the default
    provider.

  - d/p/fips/apps-speed-Omit-unavailable-algorithms-in-FIPS-mode.patch:
    Omit unavailable algorithms in FIPS mode

  - d/p/fips/apps-pass-propquery-arg-to-the-libctx-DRBG-fetches.patch
    The -propquery argument might be used to define a preference for which 
provider
    an algorithm is fetched from. Set the query properties for the library 
context
    DRBG fetches as well so that they are fetched with the same properties.

  - d/p/fips/test-Ensure-encoding-runs-with-the-correct-context-during.patch:
    This test uses 2 library contexts - one context for creating initial test 
keys,
    and then another context (or the default context) for running tests. There 
is an
    issue that during the encoding tests, the OSSL_ENCODER_CTX is created from 
the
    created EVP_PKEYs, which are associated with the library context used to 
create
    the keys. This means that encoding tests run with the wrong library context,
    which always uses the default provider.

  These changes are now included in a larger MR with other changes in
  the same package version:
  
https://code.launchpad.net/~adrien-n/ubuntu/+source/openssl/+git/openssl/+merge/462486

  The now-superseded MR is at
  
https://code.launchpad.net/~tobhe/ubuntu/+source/openssl/+git/openssl/+merge/460953

  Since OpenSSL just received another big update to 3.0.13 we had to rebase our 
changes
  and will have to rerun our install/upgrade tests.

  A test build is also available at
  https://launchpad.net/~tobhe/+archive/ubuntu/openssl-test/

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/2056593/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 2056593] Re: [FFE] FIPS compatibility patches

2024-03-13 Thread Tobias Heider
Adding a few more details as requested by Adrien.
I used lxd to run the autopkgtest, in particular:

  # Build lxd image
  /usr/bin/autopkgtest-build-lxd ubuntu-daily:noble

  # Run
  autopkgtest -s --apt-pocket=proposed ./openssl_3.0.13-1ubuntu2.dsc -- lxd 
autopkgtest/ubuntu/noble/amd64

It is quite easy to verify OpenSSL doesn't accidentally enable FIPS mode
on non fips_enabled machines.

1. openssl speed will skip non-compliant alorithms in FIPS mode, if it
starts with md5 OpenSSL is not in FIPS mode.

2. Using OPENSSL_FORCE_FIPS_MODE=1 FIPS mode can be enforced resulting
in an error if the FIPS provider is not installed. Similarly
OPENSSL_FORCE_FIPS_MODE=0 can be used to force disable FIPS mode on a
fips_enabled kernel

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to openssl in Ubuntu.
https://bugs.launchpad.net/bugs/2056593

Title:
  [FFE] FIPS compatibility patches

Status in openssl package in Ubuntu:
  New

Bug description:
  We have an open MR with a handful of FIPS compatibilty changes we wore hoping
  to get into 24.04. The main purpose of the changes is to detect whether the
  kernel is running in FIPS mode and adjust the behavior of the library
  accordingly by loading the correct provider backend and using defaults that
  are FIPS compliant (no md5, DES etc) instead trying to use non-compliant code
  paths and crashing.

  The proposed patches were taken from the OpenSSL version shipped in the FIPS
  archive at esm.ubuntu.com for 22.04. Having them in the regular archive will
  reduce the maintenance work significantly. None of the changes should have any
  impact on running OpenSSL in regular (non-fips) mode.

  Below is a detailed list of the changes:

  - d/p/fips/crypto-Add-kernel-FIPS-mode-detection.patch:
This adds a new internal API to determine whether the kernel has been booted
in FIPS mode. This can be overridden with the OPENSSL_FORCE_FIPS_MODE
environment variable. OPENSSL_FIPS_MODE_SWITCH_PATH can be used to specify 
an
alternative path for the fips_enabled file and is used in tests.
The FIPS_MODULE switch can be used to enable build of the the FIPS provider
module specific parts which are not needed in the OpenSSL library itself.

  - d/p/fips/crypto-Automatically-use-the-FIPS-provider-when-the-kerne.patch:
This automatically configures all library contexts to use the FIPS provider 
when
the kernel is booted in FIPS mode by:
- Setting "fips=yes" as the default property for algorithm fetches
- Loading and activating the FIPS provider as the fallback provider.

If applications load providers via a configuration either because the 
default
configuration is modified or they override the default configuration, this
disables loading of the fallback providers. In this case, the configuration
must load the FIPS provider when FIPS mode is enabled, else algorithm 
fetches
will fail

Applications can choose to use non-FIPS approved algorithms by specifying 
the
"-fips" or "fips=no" property for algorithm fetches and loading the default
provider.

  - d/p/fips/apps-speed-Omit-unavailable-algorithms-in-FIPS-mode.patch:
Omit unavailable algorithms in FIPS mode

  - d/p/fips/apps-pass-propquery-arg-to-the-libctx-DRBG-fetches.patch
The -propquery argument might be used to define a preference for which 
provider
an algorithm is fetched from. Set the query properties for the library 
context
DRBG fetches as well so that they are fetched with the same properties.

  - d/p/fips/test-Ensure-encoding-runs-with-the-correct-context-during.patch:
This test uses 2 library contexts - one context for creating initial test 
keys,
and then another context (or the default context) for running tests. There 
is an
issue that during the encoding tests, the OSSL_ENCODER_CTX is created from 
the
created EVP_PKEYs, which are associated with the library context used to 
create
the keys. This means that encoding tests run with the wrong library context,
which always uses the default provider.

  The link for the MR is at
  
https://code.launchpad.net/~tobhe/ubuntu/+source/openssl/+git/openssl/+merge/460953

  Since OpenSSL just received another big update to 3.0.13 we had to rebase our 
changes
  and will have to rerun our install/upgrade tests.

  A test build is also available at
  https://launchpad.net/~tobhe/+archive/ubuntu/openssl-test/

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/2056593/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 2056593] Re: [FFE] FIPS compatibility patches

2024-03-13 Thread Tobias Heider
As promised, here are some more details on how I tested:
- been running autopkgtest locally and made sure they pass (log attached)
- installed it on my local development machine to see if anything breaks
- tested the upgrade in a lxd container, made sure openssl speed works and does 
the right thing
- built and installer a FIPS provider for 24.04 and made sure everything still 
works when forcing FIPS mode

** Attachment added: "autopkgtest log"
   
https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/2056593/+attachment/5755541/+files/log

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to openssl in Ubuntu.
https://bugs.launchpad.net/bugs/2056593

Title:
  [FFE] FIPS compatibility patches

Status in openssl package in Ubuntu:
  New

Bug description:
  We have an open MR with a handful of FIPS compatibilty changes we wore hoping
  to get into 24.04. The main purpose of the changes is to detect whether the
  kernel is running in FIPS mode and adjust the behavior of the library
  accordingly by loading the correct provider backend and using defaults that
  are FIPS compliant (no md5, DES etc) instead trying to use non-compliant code
  paths and crashing.

  The proposed patches were taken from the OpenSSL version shipped in the FIPS
  archive at esm.ubuntu.com for 22.04. Having them in the regular archive will
  reduce the maintenance work significantly. None of the changes should have any
  impact on running OpenSSL in regular (non-fips) mode.

  Below is a detailed list of the changes:

  - d/p/fips/crypto-Add-kernel-FIPS-mode-detection.patch:
This adds a new internal API to determine whether the kernel has been booted
in FIPS mode. This can be overridden with the OPENSSL_FORCE_FIPS_MODE
environment variable. OPENSSL_FIPS_MODE_SWITCH_PATH can be used to specify 
an
alternative path for the fips_enabled file and is used in tests.
The FIPS_MODULE switch can be used to enable build of the the FIPS provider
module specific parts which are not needed in the OpenSSL library itself.

  - d/p/fips/crypto-Automatically-use-the-FIPS-provider-when-the-kerne.patch:
This automatically configures all library contexts to use the FIPS provider 
when
the kernel is booted in FIPS mode by:
- Setting "fips=yes" as the default property for algorithm fetches
- Loading and activating the FIPS provider as the fallback provider.

If applications load providers via a configuration either because the 
default
configuration is modified or they override the default configuration, this
disables loading of the fallback providers. In this case, the configuration
must load the FIPS provider when FIPS mode is enabled, else algorithm 
fetches
will fail

Applications can choose to use non-FIPS approved algorithms by specifying 
the
"-fips" or "fips=no" property for algorithm fetches and loading the default
provider.

  - d/p/fips/apps-speed-Omit-unavailable-algorithms-in-FIPS-mode.patch:
Omit unavailable algorithms in FIPS mode

  - d/p/fips/apps-pass-propquery-arg-to-the-libctx-DRBG-fetches.patch
The -propquery argument might be used to define a preference for which 
provider
an algorithm is fetched from. Set the query properties for the library 
context
DRBG fetches as well so that they are fetched with the same properties.

  - d/p/fips/test-Ensure-encoding-runs-with-the-correct-context-during.patch:
This test uses 2 library contexts - one context for creating initial test 
keys,
and then another context (or the default context) for running tests. There 
is an
issue that during the encoding tests, the OSSL_ENCODER_CTX is created from 
the
created EVP_PKEYs, which are associated with the library context used to 
create
the keys. This means that encoding tests run with the wrong library context,
which always uses the default provider.

  The link for the MR is at
  
https://code.launchpad.net/~tobhe/ubuntu/+source/openssl/+git/openssl/+merge/460953

  Since OpenSSL just received another big update to 3.0.13 we had to rebase our 
changes
  and will have to rerun our install/upgrade tests.

  A test build is also available at
  https://launchpad.net/~tobhe/+archive/ubuntu/openssl-test/

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/2056593/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 2056593] Re: [FFE] FIPS compatibility patches

2024-03-08 Thread Tobias Heider
** Attachment added: "apt install log from fresh noble lxd container"
   
https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/2056593/+attachment/5754146/+files/openssl_3.0.13-1ubuntu2_install.log

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to openssl in Ubuntu.
https://bugs.launchpad.net/bugs/2056593

Title:
  [FFE] FIPS compatibility patches

Status in openssl package in Ubuntu:
  New

Bug description:
  We have an open MR with a handful of FIPS compatibilty changes we wore hoping
  to get into 24.04. The main purpose of the changes is to detect whether the
  kernel is running in FIPS mode and adjust the behavior of the library
  accordingly by loading the correct provider backend and using defaults that
  are FIPS compliant (no md5, DES etc) instead trying to use non-compliant code
  paths and crashing.

  The proposed patches were taken from the OpenSSL version shipped in the FIPS
  archive at esm.ubuntu.com for 22.04. Having them in the regular archive will
  reduce the maintenance work significantly. None of the changes should have any
  impact on running OpenSSL in regular (non-fips) mode.

  Below is a detailed list of the changes:

  - d/p/fips/crypto-Add-kernel-FIPS-mode-detection.patch:
This adds a new internal API to determine whether the kernel has been booted
in FIPS mode. This can be overridden with the OPENSSL_FORCE_FIPS_MODE
environment variable. OPENSSL_FIPS_MODE_SWITCH_PATH can be used to specify 
an
alternative path for the fips_enabled file and is used in tests.
The FIPS_MODULE switch can be used to enable build of the the FIPS provider
module specific parts which are not needed in the OpenSSL library itself.

  - d/p/fips/crypto-Automatically-use-the-FIPS-provider-when-the-kerne.patch:
This automatically configures all library contexts to use the FIPS provider 
when
the kernel is booted in FIPS mode by:
- Setting "fips=yes" as the default property for algorithm fetches
- Loading and activating the FIPS provider as the fallback provider.

If applications load providers via a configuration either because the 
default
configuration is modified or they override the default configuration, this
disables loading of the fallback providers. In this case, the configuration
must load the FIPS provider when FIPS mode is enabled, else algorithm 
fetches
will fail

Applications can choose to use non-FIPS approved algorithms by specifying 
the
"-fips" or "fips=no" property for algorithm fetches and loading the default
provider.

  - d/p/fips/apps-speed-Omit-unavailable-algorithms-in-FIPS-mode.patch:
Omit unavailable algorithms in FIPS mode

  - d/p/fips/apps-pass-propquery-arg-to-the-libctx-DRBG-fetches.patch
The -propquery argument might be used to define a preference for which 
provider
an algorithm is fetched from. Set the query properties for the library 
context
DRBG fetches as well so that they are fetched with the same properties.

  - d/p/fips/test-Ensure-encoding-runs-with-the-correct-context-during.patch:
This test uses 2 library contexts - one context for creating initial test 
keys,
and then another context (or the default context) for running tests. There 
is an
issue that during the encoding tests, the OSSL_ENCODER_CTX is created from 
the
created EVP_PKEYs, which are associated with the library context used to 
create
the keys. This means that encoding tests run with the wrong library context,
which always uses the default provider.

  The link for the MR is at
  
https://code.launchpad.net/~tobhe/ubuntu/+source/openssl/+git/openssl/+merge/460953

  Since OpenSSL just received another big update to 3.0.13 we had to rebase our 
changes
  and will have to rerun our install/upgrade tests.

  A test build is also available at
  https://launchpad.net/~tobhe/+archive/ubuntu/openssl-test/

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/2056593/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp