[openssl/openssl] 036db3: s390x: Don't ignore errors from s390x_HMAC_init()

"'Ingo Franzki' via openssl-commits" <[email protected]>
Newsgroups gmane.comp.encryption.openssl.cvs
Message-ID <openssl/openssl/push/refs/heads/master/[email protected]>
  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 036db3a8ef21cd5a5c1b89808b6ddab7cb5d4f0c
      https://github.com/openssl/openssl/commit/036db3a8ef21cd5a5c1b89808b6ddab7cb5d4f0c
  Author: Ingo Franzki <[email protected]>
  Date:   2026-06-21 (Sun, 21 Jun 2026)

  Changed paths:
    M crypto/hmac/hmac.c

  Log Message:
  -----------
  s390x: Don't ignore errors from s390x_HMAC_init()

Currently errors from s390x_HMAC_init() are silently ignored and the software
path is used as fallback.

Change this to only take the software path if s390x_HMAC_init() returns -1
to indicate that it does not support the HMAC acceleration. In case of
errors, return them to the caller. Errors could be memory allocation
failures or errors during digest operations. Those should not be ignored,
but reported as failure.

This also fixes failures of the test_rsa_pkcs1_mfail test case that found
the memory allocation failures that got ignored.

References: https://github.com/openssl/openssl/issues/31480
Signed-off-by: Ingo Franzki <[email protected]>

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Dmitry Belyavskiy <[email protected]>
Reviewed-by: Eugene Syromiatnikov <[email protected]>
MergeDate: Sun Jun 21 14:19:53 2026
(Merged from https://github.com/openssl/openssl/pull/31482)


  Commit: 1a1d088d2ace4fc655c5f464405ca62c9df2d118
      https://github.com/openssl/openssl/commit/1a1d088d2ace4fc655c5f464405ca62c9df2d118
  Author: Ingo Franzki <[email protected]>
  Date:   2026-06-21 (Sun, 21 Jun 2026)

  Changed paths:
    M crypto/bn/bn_s390x.c
    M crypto/rsa/rsa_ossl.c

  Log Message:
  -----------
  s390x: Don't ignore errors from s390x_mod_exp_hw() and s390x_crt()

Currently errors from s390x_mod_exp_hw() and s390x_crt() are silently
ignored and the software path is used as fallback.

Change this to only take the software path if s390x_mod_exp_hw() and
s390x_crt() returns 0 to indicate that it does not support the RSA
acceleration. In case of errors, return them to the caller. Errors could
be memory allocation failures or errors during BIGNUM calls. Those should
not be ignored, but reported as failure.

Note that it can happen that the ioctl's fail, but this is not to be
reported as error. Those are situations where for example no suitable
crypto adapter is available, or the file descriptor has been closed
by a sandbox. Those situations disable the RSA acceleration for further
RSA requests, but the current operation should still be performed via the
software fallback. For cases where the RSA key size is too large for
acceleration, the operation must also be performed via the software
fallback, and not reported as an error.

This also fixes failures of the test_rsa_pkcs1_mfail test case that found
the memory allocation failures that got ignored.

Resolves: https://github.com/openssl/openssl/issues/31480
Signed-off-by: Ingo Franzki <[email protected]>

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Dmitry Belyavskiy <[email protected]>
Reviewed-by: Eugene Syromiatnikov <[email protected]>
MergeDate: Sun Jun 21 14:19:54 2026
(Merged from https://github.com/openssl/openssl/pull/31482)


Compare: https://github.com/openssl/openssl/compare/4d9e2a5797ec...1a1d088d2ace

To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups "openssl-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-commits/openssl/openssl/push/refs/heads/master/4d9e2a-1a1d08%40github.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.