summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/objects/obj_xref.c
diff options
context:
space:
mode:
authortb <>2026-04-07 13:15:29 +0000
committertb <>2026-04-07 13:15:29 +0000
commite783182e57d664df5859c6b6cbd65563cdc26528 (patch)
tree74e40050fa87c5fc08859ab1090ca3949b48d15e /src/lib/libcrypto/objects/obj_xref.c
parentbd035cb5927e4f4359c2ecd94226a2536b0d7773 (diff)
downloadopenbsd-e783182e57d664df5859c6b6cbd65563cdc26528.tar.gz
openbsd-e783182e57d664df5859c6b6cbd65563cdc26528.tar.bz2
openbsd-e783182e57d664df5859c6b6cbd65563cdc26528.zip
Fix NULL deref for malformed OAEP parameters in CMS decryption
This converts rsa_cms_decrypt() to use X509_ALGOR_get0() and fixes a NULL deref when a parameter is (invalidly) omitted similar to the fix in ec/ec_ameth.c r1.66 from a couple years back. There is currently an XXX annotating a hairy leak due to trying to be smart and stealing the parameters from the oaep object. Instead, just make a copy of the label string and free it in the exit path. The diff adds an error for labellen == 0 since that is an invalid encoding of pSpecifiedEmpty (see RFC 8017) -- per the DER the default must be omitted. This way we avoid a malloc(0) implementation-defined behavior. This minor issue was assigned CVE-2026-28390 by OpenSSL and was reported by too many to list. The fix is my own. It is similar to OpenSSL's fix only because I rewiewed theirs and suggested an improvement or two. This is the last of the "security fixes" in today's OpenSSL release that "affect" LibreSSL. All the other bugs were already fixed a few years back or we didn't have the code/bugs in the first place. ok beck jsing
Diffstat (limited to 'src/lib/libcrypto/objects/obj_xref.c')
0 files changed, 0 insertions, 0 deletions