<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/rsa/rsa_pmeth.c, branch OPENBSD_7_9</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2026-04-07T13:16:41+00:00</updated>
<entry>
<title>Rename labellen to label_len</title>
<updated>2026-04-07T13:16:41+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2026-04-07T13:16:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=825b6076f1b1772665d1adce40e8087ee4e3d091'/>
<id>urn:sha1:825b6076f1b1772665d1adce40e8087ee4e3d091</id>
<content type='text'>
Requested by jsing, ok beck
</content>
</entry>
<entry>
<title>Fix NULL deref for malformed OAEP parameters in CMS decryption</title>
<updated>2026-04-07T13:15:29+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2026-04-07T13:15:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=e783182e57d664df5859c6b6cbd65563cdc26528'/>
<id>urn:sha1:e783182e57d664df5859c6b6cbd65563cdc26528</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>Use err_local.h rather than err.h in most places</title>
<updated>2025-05-10T05:54:39+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-05-10T05:54:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=41e8f99dd1625a9f0c80ce9d4383e95b18e85709'/>
<id>urn:sha1:41e8f99dd1625a9f0c80ce9d4383e95b18e85709</id>
<content type='text'>
ok jsing
</content>
</entry>
<entry>
<title>rsa_pmeth: unify strcmp return checks</title>
<updated>2025-01-17T15:39:19+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-01-17T15:39:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=13bb4d5ac808eefe3abb437533ddc959dfeeceee'/>
<id>urn:sha1:13bb4d5ac808eefe3abb437533ddc959dfeeceee</id>
<content type='text'>
ok jsing
</content>
</entry>
<entry>
<title>Fix two incorrect strtonum() conversions</title>
<updated>2025-01-17T08:50:07+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-01-17T08:50:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=c7b7f02c70ae7b0b2ff0afb7ffca3587c3a5e4ea'/>
<id>urn:sha1:c7b7f02c70ae7b0b2ff0afb7ffca3587c3a5e4ea</id>
<content type='text'>
The atoi() would also accept the magic negative values and old openssl
releases would expose these as arguments to -pkeyopt rsa_pss_saltlen:-1
in the openssl pkeyutl "app". While modern openssl switched to having
readable alternatives to these, the oseid component of opensc would use
the old syntax until yesterday.

Still, this is our bug and we need to keep accepting the magic values as
such, so do so. Everything below -3 will be rejected by the RSA_ctrl()
handler later.

Debugged by Doug Engert in https://github.com/OpenSC/OpenSC/issues/3317

ok jsing op
</content>
</entry>
<entry>
<title>replace atoi(3) usage with strtonum(3); ok/tweaks tb@</title>
<updated>2024-08-26T22:01:28+00:00</updated>
<author>
<name>op</name>
<email></email>
</author>
<published>2024-08-26T22:01:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=07d3f305ea24da68aec66c7e4be39317f6ea7dae'/>
<id>urn:sha1:07d3f305ea24da68aec66c7e4be39317f6ea7dae</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rework pkey_rsa_keygen()</title>
<updated>2023-12-28T21:59:07+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-12-28T21:59:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=47ec95f1d429e392c3f445da28dfe9072f2af623'/>
<id>urn:sha1:47ec95f1d429e392c3f445da28dfe9072f2af623</id>
<content type='text'>
As usual, make the function single exit. Initialize the pkey callback
pointer and the BN_GENCB on the stack at the top rather than relying
on the weird trans_cb() in evp_pkey_set_cb_translate() to do so.
Greatly simplify the control flow and add missing error checks.

ok jsing
</content>
</entry>
<entry>
<title>Hide symbols in rsa</title>
<updated>2023-07-08T12:26:45+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2023-07-08T12:26:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=a651e5a57705b3b3f225ed686118217a44e93036'/>
<id>urn:sha1:a651e5a57705b3b3f225ed686118217a44e93036</id>
<content type='text'>
ok tb@
</content>
</entry>
<entry>
<title>Add back support for RSA_X931_PADDING</title>
<updated>2023-05-05T12:21:44+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-05-05T12:21:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=c167f76677a4e5f366fabdcac0782677114c0a66'/>
<id>urn:sha1:c167f76677a4e5f366fabdcac0782677114c0a66</id>
<content type='text'>
This makes the custom stalt stack work again.

Tested by robert as part of a larger diff
ok jsing
</content>
</entry>
<entry>
<title>Wire up truncated SHA-2, SHA-3 and related things</title>
<updated>2023-04-25T15:48:48+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-04-25T15:48:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=8c449d8a1445a23c96b8b2f389e256ea32662e36'/>
<id>urn:sha1:8c449d8a1445a23c96b8b2f389e256ea32662e36</id>
<content type='text'>
from jsing
</content>
</entry>
</feed>
