summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/X509v3_addr_add_inherit.3
diff options
context:
space:
mode:
authortb <>2023-10-01 22:14:36 +0000
committertb <>2023-10-01 22:14:36 +0000
commit27cf5f5ee7b0d7c7f21d290a91254409b310b3eb (patch)
tree75c544349a99080354385bc4932929f4dcb16cec /src/lib/libcrypto/man/X509v3_addr_add_inherit.3
parenteba3e102de17a1885344c339da67ffaa9d171d87 (diff)
downloadopenbsd-27cf5f5ee7b0d7c7f21d290a91254409b310b3eb.tar.gz
openbsd-27cf5f5ee7b0d7c7f21d290a91254409b310b3eb.tar.bz2
openbsd-27cf5f5ee7b0d7c7f21d290a91254409b310b3eb.zip
Fix a copy-paste bug in ASN1_TIME_compare()
ASN1_TIME_compare() compares two times t1 and t2. Due to a copy-paste error, we would do ASN1_time_parse(t1->data, t2->length, &tm2, t2->type) Now if t1 is a UTCTime (length 13) and t2 is a GeneralizedTime (length 15), the worst that could happen is a 2-byte out-of-bounds read. Fortunately, t1 will already have parsed as a UTCTime, so it will have a Z where there should be the first digit of the seconds for a GeneralizedTime and we will error out. Now if both t1 and t2 have the same type, we will parse t1's data twice and we will return an incorrect comparison. This could have some security impact if anything relied on this function for security purposes. It is unused in our tree and unused in our ports tree ports and the only consumer I could find was some MongoDB things doing OCSP, so this won't be too bad. Then of course there's also the language bindings. Issue reported by Duncan Thomson at esri dot com via libressl-security ok beck deraadt
Diffstat (limited to 'src/lib/libcrypto/man/X509v3_addr_add_inherit.3')
0 files changed, 0 insertions, 0 deletions