Regression from refactor of X509_load_cert_file_ex in 3.2.0 #22895
Labels
branch: master
Merge to master branch
branch: 3.2
Merge to openssl-3.2
severity: regression
The issue/pr is a regression from previous released version
triaged: bug
The issue/pr is/fixes a bug
I've found what I believe to be a regression caused by the refactoring of
X509_load_cert_file_ex
in commit ae29622 (from pull request #21545). Specifically, the removal of these 2 lines:With an upgrade to 3.2.0 (which I first noticed when Homebrew's updated to the latest version)
osslsigncode verify some-signed-pe-file.exe
started to fail for what should be valid signed binaries (like Firefox Setup 115.5.0esr.exe).Downstream bug reports:
Error message seen with openssl 3.2.0, but not 3.1.4:
The source of the regression was not at-all obvious, but through a binary search testing 3.2.0's commit history I found the commit where it broke and the minimal amount of changes from that commit needed to reproduce the issue. Adding those lines back into 3.2.0 also restored the prior behavior.
I'm not an expert on openssl's internals and can't say exactly why this subtle logic change makes openssl behave differently than it used to, but I'm guessing that the
X509
pointer is not reusable between loop iterations.P.S. I don't know what the full impact radius of this logic change is, but worry it may be substantial.
The text was updated successfully, but these errors were encountered: