Skip to content

RSA Signatures with PSS padding cause a SIGSEGV #2

@pushkarnk

Description

@pushkarnk

If an MGF1-Digest is configured for a RSA-PSS signature, sv_init() crashes with the following stack:

#0  0x00007ffff7ea5ec5 in EVP_MD_is_a () from /usr/lib/x86_64-linux-gnu/ossl-modules/fips.so
#1  0x00007ffff7e4b4d1 in rsa_check_padding () from /usr/lib/x86_64-linux-gnu/ossl-modules/fips.so
#2  0x00007ffff7e4b566 in rsa_setup_mgf1_md () from /usr/lib/x86_64-linux-gnu/ossl-modules/fips.so
#3  0x00007ffff7e4be61 in rsa_set_ctx_params () from /usr/lib/x86_64-linux-gnu/ossl-modules/fips.so
#4  0x00007ffff7e4c1f8 in rsa_signverify_init () from /usr/lib/x86_64-linux-gnu/ossl-modules/fips.so
#5  0x00007ffff7e4cf5c in rsa_digest_sign_init () from /usr/lib/x86_64-linux-gnu/ossl-modules/fips.so
#6  0x00007ffff7815779 in ?? () from /lib/x86_64-linux-gnu/libcrypto.so.3
#7  0x00007ffff7815d1e in EVP_DigestSignInit_ex () from /lib/x86_64-linux-gnu/libcrypto.so.3
#8  0x00007ffff7fbb23d in sv_init () from /home/pushkarnk/work/sprint24/5206/openssl-fips-jni-wrapper/build/bin/libjssl.so
#9  0x000055555555538f in test_rsa_sign_and_verify ()
#10 0x0000555555555575 in main ()

This is likely to be an openssl bug. Refer this to reproduce.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions