Repository navigation
OpenSSL::PKey::PKey#sign etc. with wrong type option causes SEGV - #531
Conversation
|
Thanks for the report. Can you move the |
|
I changed the base branch because this needs a backport to 3.0. Please do a rebase to remove irrelevant commits in master. |
causes SEGV if it is an Array or something like that.
5584cd3 to
ef23525
Compare
Thanks for reviewing. I updated the patch (and the commit log a few). |
|
Thank you so much! |
The following script causes SEGV:
I confirmed that it seems that SEGV occurs if the last optional argument (normally a Hash) finally processed by
pkey_ctx_apply_optionsis an Array or something like that.Since a non-nil check has done at each method function (e.g.
ossl_pkey_sign) prior to callpkey_ctx_apply_options, I addedCheck_Typeat the beginning of that function. It might be more efficient to check much earlier.