Commit Graph

6114 Commits

Author SHA1 Message Date
idk f308ebee74 bump rc 2023-05-25 03:39:18 +00:00
idk 687858e73d Router/Tunnel: xor message IDs in order to prevent cross-context leaks.
Adds unique message ID's per context to bloom filter for safer replay protection.

The transport and client tunnel managers use a message ID in order to prevent
messages from being replayed. Prior to this checkin, the message ID queue used
the same IDs in clients and transports. If a message was sent to a transport
and a client with the same message ID, the message ID in one would cause a replay
to be detected in the other.

The result would be that the message reply would come back empty, creating a
point of evidence that a client and a transport were hosted on the same router.

However, there is no way from the attackers POV to determine with certainty that
the message was dropped because the message was replayed, making it very easy to
demonstrate a potential information leak using a known router and a known client,
but more difficult, to use to deanonymize a known client on an unknown router
(i.e. by trying routers from the local NetDB).

So what we have here is a situation where an attacker observing router behavior
can say that a message was dropped, and that they have reason to believe it is
because it contained an ID which was replayed. This constitutes a potential
information leak and is resolved by this checkin.

patch created by @obscuratus, tested, reviewed and checked in by @obscuratus and @idk
2023-05-17 18:16:25 +00:00
obscuratus i2p 18d939bcd4 Router/Tunnel: Handling Updates for Inbound Messages. 2023-05-08 17:44:58 +00:00
idk 0d4eec7f7f fix decimal/comma formatting issue on stats page 2023-03-31 23:08:45 +00:00
obscuratus i2p daff55463b Router: Update and Clarify the Inline Documentation for VMCommSystem 2023-03-19 14:41:50 +00:00
idk 0401157703 fix non-zero build number change that was not checked in 2023-03-13 19:33:12 +00:00
idk 4b87f4d2cc checkin reseed update 2023-03-07 19:50:58 +00:00
zzz e1da8d13d7 Sybil: Don't catch all the i2pds publishing ::1 2023-02-18 16:44:10 -05:00
zzz a4f36c8e64 log message fix
reported by drzed
2023-02-17 18:48:42 -05:00
zzz 3636ec7cc6 javadoc fix 2023-02-17 13:36:45 -05:00
zzz b44cb59a48 Transports: Add new inbound connection throttler
To limit rate increase of inbound conns
Add exemption system so inbound tunnel builds bypass the throttler
2023-02-16 10:26:14 -05:00
zzz 5918613ff4 Tunnels: Re-enable using U routers in some expl. tunnels
to give them cover
2023-02-15 12:24:50 -05:00
zzz 5499b23189 Blocklist: Increase size for slow routers
Store feed blocklist in main array for efficiency
2023-02-15 11:47:01 -05:00
zzz 601a1c917e Sybil: Disable analysis when in test mode 2023-02-15 11:28:20 -05:00
zzz de978f3a10 SSU2: Remove dup stat update 2023-02-15 07:07:08 -05:00
zzz 46af72c529 Console, NetDB: Remove deprecated isFailing() calls 2023-02-13 10:28:51 -05:00
zzz b82cefd904 Profiles: Remove the long-unused failing peers map, deprecate all related methods 2023-02-13 10:09:55 -05:00
zzz 8f0e3d0421 Profiles: Change the new-router bonus to a penalty
Don't penalize old routers after long downtime
2023-02-13 07:24:27 -05:00
zzz 546e51e3d9 Router: Increase min version for tunnels and netdb to 0.9.51 2023-02-12 16:06:51 -05:00
zzz 86cbbd80cf Tunnels: Give up on building through U routers 2023-02-12 15:54:17 -05:00
zzz 69b73d4bc8 Profiles: Don't create new profile on message or lookup failures
Mark commErrorOccurred() unused
2023-02-12 15:06:33 -05:00
zzz 8ba5cb4d02 Profiles: Adjust capacity for send success/failure
Stub out adjustments for congestion caps
2023-02-12 14:23:10 -05:00
zzz f9b9633ac0 Profiles: Downrate capacity of slow/unreachable peers
Use more efficient RI lookup
Comment out unused same-country code
2023-02-12 13:39:47 -05:00
zzz 6f80df48e0 bump -8 2023-02-12 10:17:57 -05:00
zzz 4a9ca43614 NetDB: Don't call heardAbout() unless peer is reachable
Consolidate hash() calls
2023-02-12 10:15:28 -05:00
zzz afe236c62c Profiles: Limit storage and memory usage
Write profiles to disk more often
Delete old profiles on disk more often
Reduce max age of profiles
Limit age of profiles read in at startup based on downtime
Limit total profiles read in at startup
Change loaded profiles from a Set to a List for efficiency
Log tweaks
2023-02-12 10:11:46 -05:00
zzz 7a75ea4bef NetDB: Store handler updates
Drop some unsolicited RI stores when over thresholds
Don't update profile for banned/blocked RI
Don't flood RIs with blocked IP
Log tweaks
2023-02-12 07:58:24 -05:00
zzz 78ee005870 Data: Move LS RAP/RAR booleans up to superclass
Add RAR to I2NP DSM
WIP
2023-02-11 09:47:40 -05:00
zzz cb90139342 NetDB: Increase flood thottle time 2023-02-11 06:34:04 -05:00
zzz d6c6b5e092 NetDB: Expiration tweaks
Start expire job sooner if forced floodfill or downtime was short
Don't run refresh routers job if forced floodfill or downtime was short or vmcommsystem
Increase expire probability
Don't expire routers close to us just before midnight
Don't start expire leases job until 11 minutes after startup
Base probability out of 128 to reduce random usage
Consolidate now() calls
2023-02-11 06:02:57 -05:00
zzz 1f81d35423 Router: Tighten skew calculation window 2023-02-10 12:42:36 -05:00
zzz 12239124d6 Profiles: Don't delete old profiles from disk until 90m uptime 2023-02-09 16:27:38 -05:00
zzz 71a1d6dd7b NetDB: Don't lookup before dropping after shutdown initiated 2023-02-09 14:38:21 -05:00
zzz d3e5879068 NetDB: Improve efficiency of ExpireRoutersJob
by iterating through the map entries directly, as in ExpireLeasesJob
Expire RIs just before saving them at shutdown
2023-02-09 13:19:00 -05:00
zzz 56ab3b59a2 bump -7 2023-02-08 09:46:38 -05:00
zzz 7834f44973 NetDB: Minor cleanups and log tweaks 2023-02-08 09:36:32 -05:00
zzz 621862afa9 NetDB: Replace Set with List in ExpireLeasesJob for efficiency 2023-02-08 09:25:42 -05:00
zzz af99250a69 NetDB: Further restrict what RIs we lookup before dropping
if floodfill, unreachable, or L class
Only kicks in if we don't have a lot of RIs to begin with
2023-02-08 09:20:10 -05:00
zzz 0bce9d1211 Profiles: Reduce initial/min/max expirations
Adjust expiration faster
Use more efficient RI lookup method
2023-02-08 09:10:27 -05:00
zzz 8b7f68e6f9 NTCP: Route RI block of another router to InNetMessagePool 2023-02-08 09:05:29 -05:00
zzz 6ac08e0929 Tunnels: Load RIs more efficiently in peer selector 2023-02-08 08:58:22 -05:00
zzz b87fd621b1 NetDB: Implement faster RI expiration mode
exempt routers within our keyspace if we are floodfill
2023-02-08 08:52:12 -05:00
zzz c94bfe6cd0 NTCP: Increase temp. inbound IP block time
Block IP on failed inbound
Ban peers that ban us
2023-02-08 08:32:06 -05:00
zzz c08d6b3a18 log tweak 2023-02-08 08:27:20 -05:00
zzz 9e2bb1ad0a Transports: Check RI in handshake for matching IP 2023-02-08 08:25:09 -05:00
zzz 10e0596011 NetDB: Reduce min RI expiration 2023-02-08 08:19:34 -05:00
zzz 6216081259 NetDB: Increase closest-floodfill search size
Reduce max fail rate
Lookup RIs more efficiently
2023-02-08 08:10:46 -05:00
zzz 981946c950 NetDB: Don't explore if we have enough RIs 2023-02-08 08:05:30 -05:00
zzz 8ff421143f NetDB: Set max routers to load at startup 2023-02-08 07:40:18 -05:00
zzz 3816278a5e Router: Don't set congestion cap at startup because of high job lag 2023-02-08 07:32:56 -05:00