Skip to content

Add Fedora openssh-10.2p1 FIPS patch for wolfProvider#334

Open
ColtonWilley wants to merge 1 commit intowolfSSL:masterfrom
ColtonWilley:wp_openssh_rhel_fips_patch_10_2p1
Open

Add Fedora openssh-10.2p1 FIPS patch for wolfProvider#334
ColtonWilley wants to merge 1 commit intowolfSSL:masterfrom
ColtonWilley:wp_openssh_rhel_fips_patch_10_2p1

Conversation

@ColtonWilley
Copy link
Copy Markdown
Contributor

@ColtonWilley ColtonWilley commented May 1, 2026

Summary

Sibling to #332 (openssh-9.9p1). Adds openssh-RHEL-10.2p1-FIPS-wolfprov.patch for FIPS-mode compatibility against Fedora 44's patched openssh-10.2p1, which carries the SSHKDF routing patch (openssh-8.0p1-openssl-kdf.patch) and the FIPS adaptation patch (openssh-7.7p1-fips.patch) — the same Red Hat-derived test-fixture hostility to FIPS-restricted crypto we hit on 9.9p1.

The patch:

  • drops t1 (RSA-1024), t4 (MD5), t10 and t12 (Ed25519 keygen) from REGRESS_TARGETS (t6/t8 were removed upstream when DSA was deleted);
  • skips test_sshkey, test_sshsig, test_authopt, test_hostkeys whose testdata trees use Ed25519/DSA/short-RSA keys;
  • pins FIPS-compliant ciphers/MACs in regress/unittests/kex/test_kex.c, drops the Ed25519 host-key path, and strips curve25519/DH-SHA1/MLKEM/sntrup761 from kex_tests so SSHKDF still runs through ECDH-NIST + DH-GEX-SHA256;
  • removes a redundant #include "ssh-pkcs11-uri.h" from ssh-pkcs11.c to work around an unrelated build break in Fedora's 0052-openssh-10.2p1-pkcs11-uri.patch (the URI header lacks include guards and ends up pulled into the same TU twice — once direct, once via ssh-pkcs11.h).

Validated on a CentOS Stream 10 FIPS-enabled VM (fips=1, update-crypto-policies --set FIPS) against three stacks:

Stack Result
Stock openssl-3.5.5-2.el10 (no patch) red — t1/t4/t10/t12 + test_sshkey (RSA-1024) fail in FIPS
wolfProvider fips-baseline patched OpenSSL 3.5.5 + this patch green
wolfProvider + FIPS wolfSSL (5.9.1-fips-ready) + this patch green

test_kex runs all 90 cases under wolfProvider-as-default-OpenSSL-provider, so SSHKDF routes through wolfSSL's FIPS module via the openssl-kdf RHEL patch.

Test plan

  • rpmbuild --short-circuit -bc of Fedora f44 dist-git openssh-10.2p1 against system OpenSSL 3.5.5 in FIPS mode (with this patch applied — without it the pkcs11 hunk above blocks the build)
  • Baseline regress (no patch) reproduces the expected RHEL+FIPS failure pattern (RSA-1024, MD5, Ed25519, RSA-1024-in-test_sshkey)
  • With patch + fips-baseline OpenSSL: make -k file-tests interop-tests extra-tests unit is green
  • With patch + wolfProvider+FIPS wolfSSL: same target set is green
  • regress/unittests/kex/test_kex exercises SSHKDF via the openssl-kdf RHEL patch under wolfProvider's EVP_KDF SSHKDF implementation

Sibling to openssh-RHEL-9.9p1-FIPS-wolfprov.patch. Targets Fedora 44's
openssh-10.2p1 + 59-patch RHEL set (which carries the SSHKDF routing
patch openssh-8.0p1-openssl-kdf.patch and the FIPS adaptation patch
openssh-7.7p1-fips.patch); the Red Hat-derived test fixtures still
exercise pre-FIPS algorithms (Ed25519, MD5, RSA-1024, curve25519,
SHA1, chacha20, MLKEM, sntrup761) which a FIPS-restricted OpenSSL or
the wolfProvider fips-baseline build refuses.

Differences from the 9.9p1 sibling:

- t6 and t8 are not dropped from REGRESS_TARGETS: openssh removed the
  DSA ssh-keygen tests in 10.x, so the targets no longer exist.
- test_kex.c gained cipher/mac/key parameters in the
  do_kex_with_key() signature; the FIPS-compliant cipher/MAC pins
  are applied unconditionally inside the function body to override
  callers that pass NULL.
- The do_kex() helper now contains a benchmark path keyed on
  test_is_benchmark(); regular `make tests` does not enter that
  path, so the patch leaves it untouched.
- Drops the redundant direct `#include "ssh-pkcs11-uri.h"` in
  ssh-pkcs11.c. Fedora's 0052-openssh-10.2p1-pkcs11-uri.patch makes
  ssh-pkcs11.h include the URI header, leaving both pulled into the
  same translation unit; without include guards on the URI header
  the resulting `struct pkcs11_uri` redefinition refuses to compile.
@ColtonWilley ColtonWilley force-pushed the wp_openssh_rhel_fips_patch_10_2p1 branch from 34b1adc to 20cc60d Compare May 1, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant