diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/Destination.cpp /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/Destination.cpp --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/Destination.cpp 2026-08-18 00:11:27.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/Destination.cpp 2026-08-18 00:07:37.000000000 +0000 @@ -356,9 +356,4 @@ void LeaseSetDestination::HandleI2NPMessage (const uint8_t * buf, size_t len) { - if (len < I2NP_HEADER_SIZE) - { - LogPrint (eLogWarning, "Destination: I2NP message is too short ", len); - return; - } I2NPMessageType typeID = (I2NPMessageType)(buf[I2NP_HEADER_TYPEID_OFFSET]); uint32_t msgID = bufbe32toh (buf + I2NP_HEADER_MSGID_OFFSET); @@ -1211,9 +1206,4 @@ i2p::garlic::ECIESX25519AEADRatchetSession * from) { - if (len < 14) // 4-byte length prefix, then fromPort/toPort/protocol read at offsets up to 9 past it - { - LogPrint (eLogWarning, "Destination: Data message is too short ", len); - return; - } uint32_t length = bufbe32toh (buf); if(length > len - 4) 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-08-18 00:11:27.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/ECIESX25519AEADRatchetSession.cpp 2026-08-18 00:07:37.000000000 +0000 @@ -466,15 +466,5 @@ void ECIESX25519AEADRatchetSession::HandleNextKey (const uint8_t * buf, size_t len, const std::shared_ptr& receiveTagset) { - if (len < 3) - { - LogPrint (eLogWarning, "Garlic: Next key block is too short ", len); - return; - } uint8_t flag = buf[0]; buf++; // flag - if ((flag & ECIESX25519_NEXT_KEY_KEY_PRESENT_FLAG) && len < 35) - { - LogPrint (eLogWarning, "Garlic: Next key block with key is too short ", len); - return; - } if (flag & ECIESX25519_NEXT_KEY_REVERSE_KEY_FLAG) { diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/Garlic.cpp /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/Garlic.cpp --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/Garlic.cpp 2026-08-18 00:11:27.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/Garlic.cpp 2026-08-18 00:07:37.000000000 +0000 @@ -1008,9 +1008,4 @@ ECIESX25519AEADRatchetSession * from) { - if (!len) - { - LogPrint (eLogError, "Garlic: Clove is empty"); - return; - } const uint8_t * buf1 = buf; uint8_t flag = buf[0]; buf++; // flag @@ -1020,9 +1015,4 @@ case eGarlicDeliveryTypeDestination: LogPrint (eLogDebug, "Garlic: Type destination"); - if (len < 33) // flag + 32-byte destination hash - { - LogPrint (eLogError, "Garlic: Message is too short"); - break; - } buf += 32; // TODO: check destination [[fallthrough]]; @@ -1031,9 +1021,4 @@ { LogPrint (eLogDebug, "Garlic: Type local"); - if ((size_t)(buf - buf1) + 9 > len) // typeid(1) + msgID(4) + expiration(4) - { - LogPrint (eLogError, "Garlic: Message is too short"); - break; - } I2NPMessageType typeID = (I2NPMessageType)(buf[0]); buf++; // typeid uint32_t msgID = bufbe32toh (buf); buf += 4; // msgID diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/NetDb.cpp /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/NetDb.cpp --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/NetDb.cpp 2026-08-18 00:11:27.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/NetDb.cpp 2026-08-18 00:07:37.000000000 +0000 @@ -945,9 +945,4 @@ { const uint8_t * buf = msg->GetPayload (); - if (msg->GetPayloadLength () < 65) - { - LogPrint (eLogWarning, "NetDb: DatabaseLookup message is too short ", msg->GetPayloadLength ()); - return; - } IdentHash ident (buf); if (ident.IsZero ()) 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-08-18 00:11:27.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/SSU2Session.cpp 2026-08-18 00:07:37.000000000 +0000 @@ -1866,10 +1866,7 @@ break; case eSSU2BlkPeerTest: - if (size >= 2) - LogPrint (eLogDebug, "SSU2: PeerTest msg=", (int)buf[offset], " code=", (int)buf[offset+1]); - else - LogPrint (eLogWarning, "SSU2: PeerTest block is too short ", size); + LogPrint (eLogDebug, "SSU2: PeerTest msg=", (int)buf[offset], " code=", (int)buf[offset+1]); HandlePeerTest (buf + offset, size); - if (size >= 1 && buf[offset] < 5) + if (buf[offset] < 5) m_IsDataReceived = true; break; @@ -1903,20 +1900,12 @@ case eSSU2BlkRelayTag: LogPrint (eLogDebug, "SSU2: RelayTag"); - if (size >= 4) - m_RelayTag = bufbe32toh (buf + offset); - else - LogPrint (eLogWarning, "SSU2: RelayTag block is too short ", size); + m_RelayTag = bufbe32toh (buf + offset); break; case eSSU2BlkNewToken: { LogPrint (eLogDebug, "SSU2: New token"); - if (size >= 12) - { - uint64_t token; - memcpy (&token, buf + offset + 4, 8); - m_Server.UpdateOutgoingToken (m_RemoteEndpoint, token, bufbe32toh (buf + offset)); - } - else - LogPrint (eLogWarning, "SSU2: NewToken block is too short ", size); + uint64_t token; + memcpy (&token, buf + offset + 4, 8); + m_Server.UpdateOutgoingToken (m_RemoteEndpoint, token, bufbe32toh (buf + offset)); break; } @@ -1928,5 +1917,5 @@ { LogPrint (eLogDebug, "SSU2: Path response"); - if (size >= 8 && m_PathChallenge) + if (m_PathChallenge) { if (buf64toh (buf + offset) == m_PathChallenge->first) @@ -1952,5 +1941,4 @@ void SSU2Session::HandleDateTime (const uint8_t * buf, size_t len) { - if (len < 4) return; int64_t offset = (int64_t)i2p::util::GetSecondsSinceEpoch () - (int64_t)bufbe32toh (buf); switch (m_State) @@ -2516,5 +2504,4 @@ case 1: // Bob from Alice { - if (len < 13) return; auto session = m_Server.GetRandomPeerTestSession ((buf[12] == 6) ? i2p::data::RouterInfo::eSSU2V4 : i2p::data::RouterInfo::eSSU2V6, GetRemoteIdentity ()->GetIdentHash ()); @@ -2566,5 +2553,5 @@ { // sign with Charlie's key - if (len < offset + 10) return; + if (len < offset + 9) return; uint8_t asz = buf[offset + 9]; size_t l = asz + 10 + i2p::context.GetIdentity ()->GetSignatureLen (); @@ -2680,5 +2667,5 @@ SetTestingState (true); auto r = i2p::data::netdb.FindRouter (buf + 3); // find Charlie - if (r && len >= offset + 10) + if (r && len >= offset + 9) { uint8_t asz = buf[offset + 9]; diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/TunnelEndpoint.cpp /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/TunnelEndpoint.cpp --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/TunnelEndpoint.cpp 2026-08-18 00:11:27.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/TunnelEndpoint.cpp 2026-08-18 00:07:37.000000000 +0000 @@ -96,11 +96,4 @@ fragment += 2; - if (fragment + size > decrypted + TUNNEL_DATA_ENCRYPTED_SIZE) - { - LogPrint (eLogError, "TunnelMessage: Fragment size ", size, " exceeds tunnel data message, message dropped"); - m_CurrentMsgID = 0; m_CurrentMessage.data = nullptr; - return; - } - // handle fragment if (isFollowOnFragment)