diff options
| author | tb <> | 2026-04-07 13:15:29 +0000 |
|---|---|---|
| committer | tb <> | 2026-04-07 13:15:29 +0000 |
| commit | e783182e57d664df5859c6b6cbd65563cdc26528 (patch) | |
| tree | 74e40050fa87c5fc08859ab1090ca3949b48d15e /src/lib/libc/stdlib | |
| parent | bd035cb5927e4f4359c2ecd94226a2536b0d7773 (diff) | |
| download | openbsd-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/libc/stdlib')
0 files changed, 0 insertions, 0 deletions
