[openssl/openssl] 01ba35: Reject DSA parameters where N exceeds 512

"'Simo Sorce' via openssl-commits" <[email protected]>
Newsgroups gmane.comp.encryption.openssl.cvs
Message-ID <openssl/openssl/push/refs/heads/openssl-4.0/[email protected]>
  Branch: refs/heads/openssl-4.0
  Home:   https://github.com/openssl/openssl
  Commit: 01ba3593a0874adcda0c264b1923ed8f6735c523
      https://github.com/openssl/openssl/commit/01ba3593a0874adcda0c264b1923ed8f6735c523
  Author: Simo Sorce <[email protected]>
  Date:   2026-08-18 (Tue, 18 Aug 2026)

  Changed paths:
    M crypto/ffc/ffc_params_generate.c

  Log Message:
  -----------
  Reject DSA parameters where N exceeds 512

Update the FFC parameter validation to explicitly reject DSA configurations
where the N parameter is greater than 512. Previously, the logic accepted any
N >= 256 if L >= 3072. This change enforces the maximum supported limit for N
and raises an error to prevent the use of invalid or unsupported parameter
combinations.

This is needed because generate_q_fips186_4() allocates a `md` buffer that is
at most `EVP_MAX_MD_SIZE` long (64 bytes). If N is greater than 512 then the
qsize parameter passed in input to generate_q_fips186_4() will be greater
than 64 causing internal operations on the buffer to overflow.

This was found by Red Hat with AISLE, but deemed not a security issue
because there is no reasonable way to cause an attacket to set the qbits
values directly, if this ever happen it is just misuse of an API by an
application.

Signed-off-by: Simo Sorce <[email protected]>

Reviewed-by: Richard Levitte <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Dmitry Belyavskiy <[email protected]>
MergeDate: Tue Aug 18 12:41:55 2026
(Merged from https://github.com/openssl/openssl/pull/32271)

(cherry picked from commit 1bf213943b0f422ced4b0c2db51f626f488f89c7)



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/openssl-4.0/56c1e4-01ba35%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.