[tor-relays] Shutting down my ~40 guards

...

···

On Thursday, 15 October 2026 14:45:26 CEST boldsuck via tor-relays wrote:

Enable 'Rate limiting at the Introduction Points' for your Hidden Services.
This helps the entire network.

## HiddenService options are per onion service:
## Tor Project | Onion service DoS guidelines
HiddenServiceEnableIntroDoSDefense 1

--
╰_╯ Ciao Marco!

Debian GNU/Linux

It's free software and it gives you freedom!

Two main defenses we've found successful across ~800 guard relays the
last 5 months of the various attacks:

1) Over provision CPU and RAM
Few cores available per relay and enough RAM to let a few relays spike
from 16-30GB (max we've seen is 90GB for one relay).

2) Use mimallc to return the freed RAM faster than glibc, avoiding OOM
more often
Swap can help temporarily until mimallc frees the RAM

I'm sure that works for large dedicated servers, but there's not much
that can be done when you have 62 VPSes and a Raspberry Pi with 1-2 GB
each spread across the globe. All my servers are resource constrained,
although I do use jemalloc2 (but not mimalloc) to reduce memory use.

In my situation, memory use isn't even the limiting factor. My relays
rarely OOM before the provider suspends them for bandwidth overuse.

The full solution is to expand on these:

It's a security issue related to TROVE-2022-003, which had a fix that
was incomplete and did not mitigate a related vulnerability. A proper
fix _should_ stop the attacker dead in their tracks or at last vastly
increase their resource requirements.

Few blogs with more details from the beginning of the June and July
attacks, which are still ongoing: 1AEO Blog Index

The circuit-building attack is under control on my relays, since I'm
protecting from it on the firewall-level using a ruleset inspired by
toralf's iptables generator. Unfortunately, the BEGIN_DIR flood cannot
be mitigated using that method since each connection contains multiple
multiplexed circuits, each of which can multiplex multiple streams.

Thank you very much for your work on documenting present and past DoS
attacks against the Tor network, btw! Your insight is invaluable.

Regards,
forest

···

On 2026-10-15 16:45, Tor at 1AEO via tor-relays wrote:

_______________________________________________
tor-relays mailing list -- tor-relays@lists.torproject.org
To unsubscribe send an email to tor-relays-leave@lists.torproject.org

Would setting a bandwidth limit and hibernating your nodes instead of shutting them down be also a stopgap measure?

···

On October 15, 2026 9:52:27 PM UTC, forest via tor-relays <tor-relays@lists.torproject.org> wrote:

On 2026-10-15 16:45, Tor at 1AEO via tor-relays wrote:

Two main defenses we've found successful across ~800 guard relays the
last 5 months of the various attacks:

1) Over provision CPU and RAM
Few cores available per relay and enough RAM to let a few relays spike
from 16-30GB (max we've seen is 90GB for one relay).

2) Use mimallc to return the freed RAM faster than glibc, avoiding OOM
more often
Swap can help temporarily until mimallc frees the RAM

I'm sure that works for large dedicated servers, but there's not much
that can be done when you have 62 VPSes and a Raspberry Pi with 1-2 GB
each spread across the globe. All my servers are resource constrained,
although I do use jemalloc2 (but not mimalloc) to reduce memory use.

In my situation, memory use isn't even the limiting factor. My relays
rarely OOM before the provider suspends them for bandwidth overuse.

The full solution is to expand on these:

TROVE-2022-003: DoS via DNS requests (RESOLVE and BEGIN) (#40589) · Issues · The Tor Project / Core / Tor · GitLab
add token bucket limiter on new stream per circuit (!756) · Merge requests · The Tor Project / Core / Tor · GitLab

It's a security issue related to TROVE-2022-003, which had a fix that
was incomplete and did not mitigate a related vulnerability. A proper
fix _should_ stop the attacker dead in their tracks or at last vastly
increase their resource requirements.

Few blogs with more details from the beginning of the June and July
attacks, which are still ongoing: 1AEO Blog Index

The circuit-building attack is under control on my relays, since I'm
protecting from it on the firewall-level using a ruleset inspired by
toralf's iptables generator. Unfortunately, the BEGIN_DIR flood cannot
be mitigated using that method since each connection contains multiple
multiplexed circuits, each of which can multiplex multiple streams.

Thank you very much for your work on documenting present and past DoS
attacks against the Tor network, btw! Your insight is invaluable.

Regards,
forest

_______________________________________________
tor-relays mailing list -- tor-relays@lists.torproject.org
To unsubscribe send an email to tor-relays-leave@lists.torproject.org

Setting a bandwidth limit would automatically set DirCache 0 which would
also prevent them from being guards. I'll keep as many as I can as non-
guards, but I don't know how many I'll get to keep, since some providers
have indicated that they might not allow me to renew the service due to
the impact on their infrastructure the attacks have had.

Regards,
forest

···

On 2026-10-15 22:07, tor--- via tor-relays wrote:

Would setting a bandwidth limit and hibernating your nodes instead of
shutting them down be also a stopgap measure?

_______________________________________________
tor-relays mailing list -- tor-relays@lists.torproject.org
To unsubscribe send an email to tor-relays-leave@lists.torproject.org

With e.g.:

RelayBandwidthRate 30 MBytes
RelayBandwidthBurst 100 MBytes

you get *all* flags. I’ve always had it enabled on all my relays,
additionally on a VPS:

MaxAdvertisedBandwidth

···

On Friday, 16 October 2026 00:18:23 CEST forest via tor-relays wrote:

On 2026-10-15 22:07, tor--- via tor-relays wrote:
> Would setting a bandwidth limit and hibernating your nodes instead of
> shutting them down be also a stopgap measure?

Setting a bandwidth limit would automatically set DirCache 0 which would
also prevent them from being guards.

--
╰_╯ Ciao Marco!

Debian GNU/Linux

It's free software and it gives you freedom!

Interesting speculation regarding Hetzner. I have a guard relay on
Hetzner (which has been there for over 8 years). That relay (1)
currently has the HSDir flag with over 9000 Established connections.

According to tormetics (2) the relay had wildly assymetric traffic
issues on 21 September, 8 October, and most recently on 13 October. The
earliest issue I can see was around 21 July.

My apologies, I haven't paid much attention to that relay for some
time, but the recent logs show the low memory symptoms discussed here
on the days when the relay is seeing the assymetric traffic issues. (3)

Mick

(1) sinkrlogin - fingerprint AE4FAE2EB5DC5D078458F0FCBF2B37F5D73F0868

(2)

(3)
Oct 13 11:12:17.000 [notice] We're low on memory (cell queues total
alloc: 186758880 buffer total alloc: 815831040, tor compress total
alloc: 0 (zlib: 0, zstd: 0, lzma: 0), rendezvous cache total alloc:
70180965). Killing circuits withover-long queues. (This behavior is
controlled by MaxMemInQueues.)
Oct 13 11:12:17.000 [notice] Removed 107478992 bytes by killing 439
circuits; 64019 circuits remain alive. Also killed 0 non-linked
directory connections. Killed 18 edge connections
Oct 13 11:12:20.000 [notice] We're low on memory (cell queues total
alloc: 185225040 buffer total alloc: 817553408, tor compress total
alloc: 0 (zlib: 0, zstd: 0, lzma: 0), rendezvous cache total alloc:
70205364). Killing circuits withover-long queues. (This behavior is
controlled by MaxMemInQueues.)
Oct 13 11:12:20.000 [notice] Removed 107712352 bytes by killing 464
circuits; 63978 circuits remain alive. Also killed 0 non-linked
directory connections. Killed 10 edge connections

···

On Sun, 18 Oct 2026 05:08:36 +0000 kullikovana via tor-relays <tor-relays@lists.torproject.org> allegedly wrote:

I had the flag like 12 hours and last night again attacked. Always
takes a week to get the flag back and then attack comes. Im gonna
start just rebooting the relay when i get the flag. This is just
stupid. 4 weeks running the relay and four attacks. I have pretty
rare vps provider and also forest have rare ones. Is there
connection? Its so much easier to track users if every f'cking relay
is at hetzner.

_______________________________________________
tor-relays mailing list -- tor-relays@lists.torproject.org
To unsubscribe send an email to tor-relays-leave@lists.torproject.org

I also have tor relays running on hetzner/ovh and they, too, have been victims of these attacks.

···

On 18/10/2026, 13:47 mick via tor-relays <tor-relays@lists.torproject.org> wrote:

On Sun, 18 Oct 2026 05:08:36 +0000 > kullikovana via tor-relays <tor-relays@lists.torproject.org> allegedly > wrote:

I had the flag like 12 hours and last night again attacked. Always
takes a week to get the flag back and then attack comes. Im gonna
start just rebooting the relay when i get the flag. This is just
stupid. 4 weeks running the relay and four attacks. I have pretty
rare vps provider and also forest have rare ones. Is there
connection? Its so much easier to track users if every f’cking relay
is at hetzner.

Interesting speculation regarding Hetzner. I have a guard relay on
Hetzner (which has been there for over 8 years). That relay (1)
currently has the HSDir flag with over 9000 Established connections.

According to tormetics (2) the relay had wildly assymetric traffic
issues on 21 September, 8 October, and most recently on 13 October. The
earliest issue I can see was around 21 July.

My apologies, I haven’t paid much attention to that relay for some
time, but the recent logs show the low memory symptoms discussed here
on the days when the relay is seeing the assymetric traffic issues. (3)

Mick

(1) sinkrlogin - fingerprint AE4FAE2EB5DC5D078458F0FCBF2B37F5D73F0868

(2)
https://metrics.torproject.org/rs.html#details/AE4FAE2EB5DC5D078458F0FCBF2B37F5D73F0868

(3)
Oct 13 11:12:17.000 [notice] We’re low on memory (cell queues total
alloc: 186758880 buffer total alloc: 815831040, tor compress total
alloc: 0 (zlib: 0, zstd: 0, lzma: 0), rendezvous cache total alloc:
70180965). Killing circuits withover-long queues. (This behavior is
controlled by MaxMemInQueues.)
Oct 13 11:12:17.000 [notice] Removed 107478992 bytes by killing 439
circuits; 64019 circuits remain alive. Also killed 0 non-linked
directory connections. Killed 18 edge connections
Oct 13 11:12:20.000 [notice] We’re low on memory (cell queues total
alloc: 185225040 buffer total alloc: 817553408, tor compress total
alloc: 0 (zlib: 0, zstd: 0, lzma: 0), rendezvous cache total alloc:
70205364). Killing circuits withover-long queues. (This behavior is
controlled by MaxMemInQueues.)
Oct 13 11:12:20.000 [notice] Removed 107712352 bytes by killing 464
circuits; 63978 circuits remain alive. Also killed 0 non-linked
directory connections. Killed 10 edge connections


tor-relays mailing list – tor-relays@lists.torproject.org
To unsubscribe send an email to tor-relays-leave@lists.torproject.org

Hi,

It really depends how long my relay is spared from the attacks. I run a Raspi 4 relay at home in Switzerland and it has gained back the HSdir and Guard flags and is keeping them for 2,5 days now. All I can do is hope that it won't get attacked again.

Best,
Mike

···

On 19.10.2026 10:46, kullikovana via tor-relays wrote:
> Can i ask you guys, when you get your flag / flags back how long does it
> take the attack comes again. I get it in 12 hours or one time almost
> instantly?
>
> Also how widespread is this? Is everyone getting it?

_______________________________________________
tor-relays mailing list -- tor-relays@lists.torproject.org
To unsubscribe send an email to tor-relays-leave@lists.torproject.org

Can i ask you guys, when you get your flag / flags back how long does
it take the attack comes again. I get it in 12 hours or one time
almost instantly?

My node is still up and running fine, with both the guard and HSDir
flags as at 14.00 GMT today. The last seen issue was between 11 October
and 15 October (so some 4-5 days ago).

Also how widespread is this? Is everyone getting it?

I don't know.

Mick

···

On Mon, 19 Oct 2026 08:46:30 +0000 kullikovana via tor-relays <tor-relays@lists.torproject.org> allegedly wrote:

_______________________________________________
tor-relays mailing list -- tor-relays@lists.torproject.org
To unsubscribe send an email to tor-relays-leave@lists.torproject.org

The two latest attacks against my relay started at 0:48 UTC and 12:33 UTC, both less than 12 hours after receiving the HSDir flag. Could be a coincidence, or they’re scanning the consensus for targets at 12-hour intervals at noon and midnight.
The metrics page shows an average of around 65 Gbps for served directory requests over the last month, so it’s quite widespread.

···

On Monday, October 19th, 2026 at 11:50 AM, kullikovana via tor-relays tor-relays@lists.torproject.org wrote:

Can i ask you guys, when you get your flag / flags back how long does it take the attack comes again. I get it in 12 hours or one time almost instantly?

Also how widespread is this? Is everyone getting it?

On Monday, October 19th, 2026 at 10:30 AM, Lukas Seitz via tor-relays <tor-relays@lists.torproject.org> wrote:

I also have tor relays running on hetzner/ovh and they, too, have been victims of these attacks.

On 18/10/2026, 13:47 mick via tor-relays <tor-relays@lists.torproject.org> wrote:

On Sun, 18 Oct 2026 05:08:36 +0000
kullikovana via tor-relays <tor-relays@lists.torproject.org> allegedly
wrote:

I had the flag like 12 hours and last night again attacked. Always
takes a week to get the flag back and then attack comes. Im gonna
start just rebooting the relay when i get the flag. This is just
stupid. 4 weeks running the relay and four attacks. I have pretty
rare vps provider and also forest have rare ones. Is there
connection? Its so much easier to track users if every f’cking relay
is at hetzner.

Interesting speculation regarding Hetzner. I have a guard relay on
Hetzner (which has been there for over 8 years). That relay (1)
currently has the HSDir flag with over 9000 Established connections.

According to tormetics (2) the relay had wildly assymetric traffic
issues on 21 September, 8 October, and most recently on 13 October. The
earliest issue I can see was around 21 July.

My apologies, I haven’t paid much attention to that relay for some
time, but the recent logs show the low memory symptoms discussed here
on the days when the relay is seeing the assymetric traffic issues. (3)

Mick

(1) sinkrlogin - fingerprint AE4FAE2EB5DC5D078458F0FCBF2B37F5D73F0868

(2)
https://metrics.torproject.org/rs.html#details/AE4FAE2EB5DC5D078458F0FCBF2B37F5D73F0868

(3)
Oct 13 11:12:17.000 [notice] We’re low on memory (cell queues total
alloc: 186758880 buffer total alloc: 815831040, tor compress total
alloc: 0 (zlib: 0, zstd: 0, lzma: 0), rendezvous cache total alloc:
70180965). Killing circuits withover-long queues. (This behavior is
controlled by MaxMemInQueues.)
Oct 13 11:12:17.000 [notice] Removed 107478992 bytes by killing 439
circuits; 64019 circuits remain alive. Also killed 0 non-linked
directory connections. Killed 18 edge connections
Oct 13 11:12:20.000 [notice] We’re low on memory (cell queues total
alloc: 185225040 buffer total alloc: 817553408, tor compress total
alloc: 0 (zlib: 0, zstd: 0, lzma: 0), rendezvous cache total alloc:
70205364). Killing circuits withover-long queues. (This behavior is
controlled by MaxMemInQueues.)
Oct 13 11:12:20.000 [notice] Removed 107712352 bytes by killing 464
circuits; 63978 circuits remain alive. Also killed 0 non-linked
directory connections. Killed 10 edge connections


tor-relays mailing list – tor-relays@lists.torproject.org
To unsubscribe send an email to tor-relays-leave@lists.torproject.org


tor-relays mailing list – tor-relays@lists.torproject.org
To unsubscribe send an email to tor-relays-leave@lists.torproject.org

I spoke too soon.

At around 14.40 GMT on October 19 I started to see the beginning of the
asymmetric traffic indicative of an attack. Tor logs show: (1)

Nyx currently shows Download 2.1 MB/s with Upload 4.6 MB/s. I still have
all the flags I expect to see, but I have not yet restarted Tor, merely
reloaded (yesterday) after a reduction in MaxAdvertisedBandwidth.

(1) Oct 19 14:40:34.000 [warn] Your computer is too slow to handle this
many circuit creation requests!

and

Oct 19 14:41:43.000 [notice] We're low on memory (cell queues total
alloc: 431635248 buffer total alloc: 1622749184, tor compress total
alloc: 0 (zlib: 0, zstd: 0, lzma: 0), rendezvous cache total alloc:
95502898). Killing circuits withover-long queues. (This behavior is
controlled by MaxMemInQueues.

Mick

···

On Mon, 19 Oct 2026 14:05:04 +0100 mick via tor-relays <tor-relays@lists.torproject.org> allegedly wrote:

My node is still up and running fine, with both the guard and HSDir
flags as at 14.00 GMT today. The last seen issue was between 11
October and 15 October (so some 4-5 days ago).
>

_______________________________________________
tor-relays mailing list -- tor-relays@lists.torproject.org
To unsubscribe send an email to tor-relays-leave@lists.torproject.org

Now I got:
[warn] Your computer is too slow to handle this many circuit creation requests! Please consider using the MaxAdvertisedBandwidth config option or choosing a more restricted exit policy

Is that maybe part of an attack?

The machine is an Intel Atom, but normally it was able to handle all the traffic. I also saw that Tor creates load on one core, not on 2.

Is Tor able to spawn 2 processes to handle the traffic?

···

Am 13.10.26 um 08:17 schrieb Marco Moock via tor-relays:

Am 13.10.26 um 00:53 schrieb forest via tor-relays:

That was only possible in the v2 days, but v3 onion services are blinded
which means it's not possible to find out the .onion address even if you
are their HSDir. There's very little an attacker can do in the position
of HSDir besides selective censorship (if they already know the .onion,
they can match it to the descriptor and censor it).

CCing Tobias Höller who I know is working on HSDir research and might
have some insight into this whole situation.

Are relays known which have HSDir and do such censorship attacks?

Is there a good way to detect such attacks?

--
Gruß
Marco
Muell und Spam bitte an abfalleimer2002@stinkedores.dorfdsl.de

Hi Marco,

Multiple things can cause that warning, an attack is one of them. Hard to tell from the warning message alone, though.

C-Tor is mostly single-threaded. Some circuit work does get delegated to helper threads, but most of the work happens on the main thread which is the bottleneck.

···

On Tuesday, October 20th, 2026 at 6:38 PM, Marco Moock via tor-relays <tor-relays@lists.torproject.org> wrote:

Am 13.10.26 um 08:17 schrieb Marco Moock via tor-relays:
> Am 13.10.26 um 00:53 schrieb forest via tor-relays:
>> That was only possible in the v2 days, but v3 onion services are blinded
>> which means it's not possible to find out the .onion address even if you
>> are their HSDir. There's very little an attacker can do in the position
>> of HSDir besides selective censorship (if they already know the .onion,
>> they can match it to the descriptor and censor it).
>>
>> CCing Tobias Höller who I know is working on HSDir research and might
>> have some insight into this whole situation.
>
> Are relays known which have HSDir and do such censorship attacks?
>
> Is there a good way to detect such attacks?

Now I got:
[warn] Your computer is too slow to handle this many circuit creation
requests! Please consider using the MaxAdvertisedBandwidth config option
or choosing a more restricted exit policy

Is that maybe part of an attack?

The machine is an Intel Atom, but normally it was able to handle all the
traffic. I also saw that Tor creates load on one core, not on 2.

Is Tor able to spawn 2 processes to handle the traffic?

--
Gruß
Marco
Muell und Spam bitte an abfalleimer2002@stinkedores.dorfdsl.de
_______________________________________________
tor-relays mailing list -- tor-relays@lists.torproject.org
To unsubscribe send an email to tor-relays-leave@lists.torproject.org

_______________________________________________
tor-relays mailing list -- tor-relays@lists.torproject.org
To unsubscribe send an email to tor-relays-leave@lists.torproject.org

Hi everyone,

The attack started targeting my relay yesterday at 12:00 UTC, 15 hours after the relay achieved the HSDir flag. This time I had implemented a rate cap (on version 0.4.9.14) for BEGIN_DIR which allowed me to try out a few different things.
The rate limiter has a configurable rate/burst limit and two configurable defense types:
Either
- Refuse the stream by sending END_STREAM_REASON_NOTDIRECTORY back to the offender
Or
- Close the offending circuit by sending -END_CIRC_REASON_RESOURCELIMIT back to the offender

At the beginning of the attack I was limiting BEGIN_DIR requests to 200/s and refusing anything beyond that. The attacker was spawning 300 circuits per second on average and hitting me with ~55,000 BEGIN_DIR requests per second on average. After 8 hours of being attacked the relay logged "1647224804 BEGIN_DIR rejected". During these first 8 hours, the relay remained responsive, with memory usage staying flat at or under 1000MB, main thread CPU usage 20-80% and traffic 200-850 Mbps with a bandwidth ratio of around 2:1 down:up. CPU usage was highly correlated with the amount of traffic being moved. There were also occasional latency spikes while the bandwidth was close to the Gbit line rate.

At 8 hours into the attack I reloaded Tor with the other defense type (close BEGIN_DIR circuits) and lowering the limit to 100 requests per second. Bandwidth usage immediately dropped to 80-100 Mbps in both directions and CPU usage plummeted to <10%. The attack now changed its strategy and started creating circuits at an increasing rate, topping out at 1500 circuits per second, still no match for 12 Ryzen cores though. At the time of writing the attacker is still spawning around 1000 circuits per second and the main thread is at 10% of one core with the circuit work being spread out over the rest of the cores.

This shows the attacker has the capability to send closer to 100,000 requests per second and change its strategy on the fly.

21 hours into the attack the relay is completely stable, bandwidth usage in control and all flags retained. The only downside is that legitimate directory requests get denied while the attack lasts, a minor issue compared to losing the HSDir flag for days at a time. The legitimate requests just retry another directory.

I'll keep you updated.

···

On Wednesday, October 21st, 2026 at 12:49 PM, TinCan via tor-relays <tor-relays@lists.torproject.org> wrote:

Hi Marco,

Multiple things can cause that warning, an attack is one of them. Hard to tell from the warning message alone, though.

C-Tor is mostly single-threaded. Some circuit work does get delegated to helper threads, but most of the work happens on the main thread which is the bottleneck.

On Tuesday, October 20th, 2026 at 6:38 PM, Marco Moock via tor-relays <tor-relays@lists.torproject.org> wrote:

> Am 13.10.26 um 08:17 schrieb Marco Moock via tor-relays:
> > Am 13.10.26 um 00:53 schrieb forest via tor-relays:
> >> That was only possible in the v2 days, but v3 onion services are blinded
> >> which means it's not possible to find out the .onion address even if you
> >> are their HSDir. There's very little an attacker can do in the position
> >> of HSDir besides selective censorship (if they already know the .onion,
> >> they can match it to the descriptor and censor it).
> >>
> >> CCing Tobias Höller who I know is working on HSDir research and might
> >> have some insight into this whole situation.
> >
> > Are relays known which have HSDir and do such censorship attacks?
> >
> > Is there a good way to detect such attacks?
>
> Now I got:
> [warn] Your computer is too slow to handle this many circuit creation
> requests! Please consider using the MaxAdvertisedBandwidth config option
> or choosing a more restricted exit policy
>
> Is that maybe part of an attack?
>
> The machine is an Intel Atom, but normally it was able to handle all the
> traffic. I also saw that Tor creates load on one core, not on 2.
>
> Is Tor able to spawn 2 processes to handle the traffic?
>
> --
> Gruß
> Marco
> Muell und Spam bitte an abfalleimer2002@stinkedores.dorfdsl.de
> _______________________________________________
> tor-relays mailing list -- tor-relays@lists.torproject.org
> To unsubscribe send an email to tor-relays-leave@lists.torproject.org
>
_______________________________________________
tor-relays mailing list -- tor-relays@lists.torproject.org
To unsubscribe send an email to tor-relays-leave@lists.torproject.org

_______________________________________________
tor-relays mailing list -- tor-relays@lists.torproject.org
To unsubscribe send an email to tor-relays-leave@lists.torproject.org

2 Likes

Hi everyone,

Hello TinCan!

dgoulet here, from the Tor network team. First, thanks for this report, very
useful!

We are currently working on several fixes for this ongoing BEGIN_DIR DDoS badly
affecting the network. Next release (soon!) will most likely have them in.

It will be a fun one because to be effective, we will need most of the relays
to upgrade so to avoid degradation.

I have couple questions for you.

The attack started targeting my relay yesterday at 12:00 UTC, 15 hours after
the relay achieved the HSDir flag. This time I had implemented a rate cap (on
version 0.4.9.14) for BEGIN_DIR which allowed me to try out a few different
things. The rate limiter has a configurable rate/burst limit and two
configurable defense types:
Either
- Refuse the stream by sending END_STREAM_REASON_NOTDIRECTORY back to the offender
Or
- Close the offending circuit by sending -END_CIRC_REASON_RESOURCELIMIT back to the offender

At the beginning of the attack I was limiting BEGIN_DIR requests to 200/s and
refusing anything beyond that. The attacker was spawning 300 circuits per
second on average and hitting me with ~55,000 BEGIN_DIR requests per second
on average. After 8 hours of being attacked the relay logged "1647224804
BEGIN_DIR rejected". During these first 8 hours, the relay remained
responsive, with memory usage staying flat at or under 1000MB, main thread
CPU usage 20-80% and traffic 200-850 Mbps with a bandwidth ratio of around
2:1 down:up. CPU usage was highly correlated with the amount of traffic being
moved. There were also occasional latency spikes while the bandwidth was
close to the Gbit line rate.

Are you able to tell me if these BEGIN_DIR are for onion service descriptors as
in your relay being an HSDir? Or they are normal regular BEGIN_DIR requests
from a client asking for other directory information (ex: consensus)?

Also, that limit you put in is global to all circuits or per circuit?

At 8 hours into the attack I reloaded Tor with the other defense type (close
BEGIN_DIR circuits) and lowering the limit to 100 requests per second.
Bandwidth usage immediately dropped to 80-100 Mbps in both directions and CPU
usage plummeted to <10%. The attack now changed its strategy and started
creating circuits at an increasing rate, topping out at 1500 circuits per
second, still no match for 12 Ryzen cores though. At the time of writing the
attacker is still spawning around 1000 circuits per second and the main
thread is at 10% of one core with the circuit work being spread out over the
rest of the cores.

The circuit rate here is wild! We have DoS defenses in place for rate limiting
circuit creation per IP address so are these 1000/sec circuits coming from 1000
different addresses?

Note here that if they come from tor clients, you will have a single
**unauthenticated channel** (tor channel) per client IP address. This would
imply they are a single hop request to your relay so client -> your relay. And
thus generic directory requests such as consensus fetch for instance.

If they come from a relay, it would be on an **authenticated** channel and this
means these BEGIN_DIR request come from a multi-hop circuit implying onion
service descriptor get/post.

I'm giving you these details because if you point a LLM at your 500MB debug
logs ;), it is possible to tell if the channel those circuits are on is
authenticated vs not.

The difference is very important here because in both cases, we will apply
different fixes. And it would be very useful to learn what you are seeing.

Thanks a lot for your help! If you want to chat, I'm "dgoulet" on our #tor-dev
IRC channel which you can access via Matrix as well.

Cheers!
David

···

On 22 Oct (09:00:27), TinCan via tor-relays wrote:

--
Fwj9yfk1MF4rtih0k2x/SemjPPhGxtNXDVaAx9n7TgQ=

1 Like

affecting the network. Next release (soon!) will most likely have them in.

It will be a fun one because to be effective, we will need most of the relays
to upgrade so to avoid degradation.

If you cannot implement effective directory rate limiting for an individual relay, then please, simply expose an attack in the logs! In fact, please do this too whatever other mitigations you implement.

Currently internal over-tor attacks cannot be easily mitigated at the operator level through effective firewalling because there is no reporting surface to parse to craft an nft / iptables rule. Any time an attack is occurring and over-limit directory requests are detected from any one relay, simply expose that in the logs. Tor is allergic to proper logging, for perhaps good overarching reasons. That said, over-limit directory accesses can only have one purpose and exposing the offender's IP in the relay's logs is not a privacy issue.

Moreover, this arms every single operator with the tools we need to combat this.

In the short term, an entry in the global log is fine. In the medium term consider a separate "external attack" log file or socket that can itself be easily parsed that contains only these reports.

The former is an hour's work for someone familiar with the code base. The latter perhaps two or three.

In the longer term, this also arms the directory authorities with the ability to propagate IP-level blocking suggestions to the entire tor relay network for many other types of attacks by simply propagating agreed on bad actors to relays which simply then expose those in the log. Every relay operator implementing a log parser will block those offending IP's overnight.

   Oaive / Redwave

···

On 2026-10-22 13:38, David Goulet via tor-relays wrote:
_______________________________________________
tor-relays mailing list -- tor-relays@lists.torproject.org
To unsubscribe send an email to tor-relays-leave@lists.torproject.org

You can compile Tor yourself. It's easy and has few dependencies. If you
don't want to do that, doesn't FreeBSD have a Linux compatibility layer?
You could download and extract the official .deb and run the binary with
that compatibility layer until the FreeBSD Tor maintainer does his job.

I'd definitely recommend upgrading to .15 as it largely mitigates the
attacks. There's still some high CPU usage and onionskin drops, but no
crippling performance loss and insane network usage.

Regards,
forest

···

On 2026-11-04 04:17, kullikovana via tor-relays wrote:

Getting attacked like normal and it seems .14 is not recommended now.
Freebsd isnt updating theyre packages so yeh. Just fantastic. I dont
recommend anyone to use freebsd the updates are week late always.

_______________________________________________
tor-relays mailing list -- tor-relays@lists.torproject.org
To unsubscribe send an email to tor-relays-leave@lists.torproject.org