Opened 11 years ago

Last modified 7 years ago

#824 closed defect (Fixed)

More accurate calculation of bandwith limits in past.

Reported by: rovv Owned by:
Priority: Low Milestone:
Component: Core Tor/Tor Version: 0.2.0.31
Severity: Keywords:
Cc: rovv, nickm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Buckets decrements with raw bytes for OR connection which more than
real bytes. So global write bucket can and do run dry with negative
numbers, if Tor transmit cells.

Fix can repair possibly issue with DoS against relay with DirPort
reported by Scott Bennett on or-talk some time ago
(december '07 and later).

--- connection.original.c Mon Sep 8 13:10:16 2008
+++ connection.c Thu Sep 25 20:44:40 2008
@@ -1718,7 +1718,7 @@

tor_assert(seconds_elapsed >= 0);


write_buckets_empty_last_second =

global_relayed_write_bucket == 0 + global_relayed_write_bucket <= 0
global_write_bucket == 0;
global_write_bucket <= 0;


/* refill the global buckets */
connection_bucket_refill_helper(&global_read_bucket,

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Change History (3)

comment:1 Changed 11 years ago by nickm

Applied; thanks!

comment:2 Changed 11 years ago by nickm

flyspray2trac: bug closed.

comment:3 Changed 7 years ago by nickm

Component: Tor RelayTor
Note: See TracTickets for help on using tickets.