diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/ECIESX25519AEADRatchetSession.cpp /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/ECIESX25519AEADRatchetSession.cpp --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/ECIESX25519AEADRatchetSession.cpp 2026-07-30 11:06:54.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/ECIESX25519AEADRatchetSession.cpp 2026-07-30 11:02:17.000000000 +0000 @@ -790,9 +790,4 @@ // we are Alice LogPrint (eLogDebug, "Garlic: Reply received"); - if (len < 8) - { - LogPrint (eLogWarning, "Garlic: Reply message is too short ", len); - return false; - } const uint8_t * tag = buf; buf += 8; len -= 8; // tag @@ -934,9 +929,4 @@ std::shared_ptr receiveTagset, int index) { - if (len < 8) - { - LogPrint (eLogWarning, "Garlic: Existing session message is too short ", len); - return false; - } uint8_t nonce[12]; CreateNonce (index, nonce); // tag's index @@ -1392,9 +1382,4 @@ { if (!GetOwner ()) return false; - if (len < 32) - { - LogPrint (eLogWarning, "Garlic: Message for router is too short ", len); - return false; - } m_CurrentNoiseState = GetNoiseState (); // we are Bob @@ -1408,9 +1393,4 @@ m_CurrentNoiseState.MixKey (sharedSecret); buf += 32; len -= 32; - if (len < 16) - { - LogPrint (eLogWarning, "Garlic: Payload for router is too short ", len); - return false; - } uint8_t nonce[12]; CreateNonce (0, nonce); diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/NTCP2.cpp /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/NTCP2.cpp --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/NTCP2.cpp 2026-07-30 11:06:54.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/NTCP2.cpp 2026-07-30 11:02:17.000000000 +0000 @@ -397,5 +397,5 @@ if (m_BufferLen > NTCP2_SESSION_HANDSHAKE_MAX_SIZE) m_IsLongPadding = true; m3p2Len = bufbe16toh (options + 4); - if (m3p2Len < 19) // 16 bytes MAC + at least 1 byte block type + 2 bytes block size + if (m3p2Len < 16) { LogPrint (eLogWarning, "NTCP2: SessionRequest m3p2len=", m3p2Len, " is too short"); @@ -844,5 +844,9 @@ if (paddingLen > 0) { - if (m_Establisher->m_BufferLen + paddingLen <= m_Establisher->m_MaxMsgSize) +#if OPENSSL_PQ + if (paddingLen <= m_Establisher->m_MaxMsgSize - 80) +#else + if (paddingLen <= m_Establisher->m_MaxMsgSize - 64) +#endif { boost::asio::async_read (m_Socket, boost::asio::buffer(m_Establisher->m_Buffer + m_Establisher->m_BufferLen, paddingLen), boost::asio::transfer_all (), @@ -986,5 +990,5 @@ } auto size = bufbe16toh (buf->data () + 1); - if (size + 3 > buf->size () || size > i2p::data::MAX_RI_BUFFER_SIZE + 1) + if (size > buf->size () - 3 || size > i2p::data::MAX_RI_BUFFER_SIZE + 1) { LogPrint (eLogError, "NTCP2: Unexpected RouterInfo size ", size, " in SessionConfirmed"); @@ -1302,9 +1306,4 @@ case eNTCP2BlkRouterInfo: { - if (size < 1) - { - LogPrint (eLogWarning, "NTCP2: RouterInfo block is too short"); - break; - } LogPrint (eLogDebug, "NTCP2: RouterInfo flag=", (int)frame[offset]); if (size <= i2p::data::MAX_RI_BUFFER_SIZE + 1) diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/SSU2Session.cpp /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/SSU2Session.cpp --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/SSU2Session.cpp 2026-07-30 11:06:54.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/SSU2Session.cpp 2026-07-30 11:02:17.000000000 +0000 @@ -1300,5 +1300,5 @@ } } - if (len < 83) // 64 bytes header/part1 + 16 bytes MAC + at least 1 byte block type + 2 bytes block size + if (len < 80) { LogPrint (eLogWarning, "SSU2: SessionConfirmed message too short ", len);