You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/src/botan/src/lib/x509/x509_ext.cpp:1324:62: runtime error: shift exponent 32 is too large for 32-bit type 'int'
#0 0x567f4e426b45 in Botan::Cert_Extension::IPAddressBlocks::IPAddressOrRange<(Botan::Cert_Extension::IPAddressBlocks::Version)16>::decode_from(Botan::BER_Decoder&) [botan/src/lib/x509/x509_ext.cpp:0](https://github.com/randombit/botan/blob/5fbcc7daa2be40fc662e48343882f7abc8827a94/src/lib/x509/x509_ext.cpp#L0)
#1 0x567f4e2d0640 in Botan::BER_Decoder::decode(Botan::ASN1_Object&, Botan::ASN1_Type, Botan::ASN1_Class) [botan/src/lib/asn1/ber_dec.cpp:371](https://github.com/randombit/botan/blob/5fbcc7daa2be40fc662e48343882f7abc8827a94/src/lib/asn1/ber_dec.cpp#L371):8
Ah, I see what's going on: we never assert that unused_bits is actually something sensible, so nothing is stopping someone from encoding a 32 or larger there and cause the above. Will address in #4890, along with something way more spicy I also found today. Though I don't yet quite understand how it got to 32 in the first place, that should all be uint8_ts 🤔 Cpp does not, in fact, cast the 1 we shift with to a u8 at compile time like I assumed
OSS-Fuzz 420401644 just posting this publicly since it's not in a release
@arckoor can you take a look?
Hex encoding of the minimized test case
The text was updated successfully, but these errors were encountered: