Skip to content

Tor 0.4.8.9 broken in combination with vanguards

Summary

Downloads are interrupted after a few seconds.

This bug was introduced between Tor version 0.4.7.16-1 (from Debian bookworm security repository) and Tor version 0.4.8.9-1~d12.bookworm+1 (from deb.torproject.org). I am certain that I could pinpoint it to it.

The issue is only reproducible if vanguards is installed.

The older Tor version from Debian bookworm security repository version 0.4.7.16-1 does not have this issue.

Steps to reproduce:

  1. Use a Debian bookworm.
  2. Enable deb.torproject.org
  3. sudo apt update
  4. sudo apt install --no-install-recommends vanguards tor
  5. Edit /etc/tor/vanguards.conf and change control_socket = to control_socket = /run/tor/control (related ticket)
  6. sudo systemctl enable vanguards (potential Debian bug not being enabled by default)
  7. sudo systemctl restart tor@default
  8. sudo systemctl restart vanguards
  9. (In App Qube)
  10. torsocks curl --fail --output /tmp/test.tar.xz https://dist.torproject.org/torbrowser/13.0.5/tor-browser-linux-x86_64-13.0.5.tar.xz

What is the current bug behavior?

Connection drops after a bit of continued file downloads.

torsocks curl --fail --output /tmp/test.tar.xz https://dist.torproject.org/torbrowser/13.0.5/tor-browser-linux-x86_64-13.0.5.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  3  107M    3 3624k    0     0  24100      0  1:17:51  0:02:34  1:15:17 29815
curl: (18) transfer closed with 108874640 bytes remaining to read
zsh: exit 18    torsocks curl --fail --output /tmp/test.tar.xz 

What is the expected behavior?

No connection drops.

Environment

  • Qubes R4.2
  • Debian based App Qube
  • Tor version 0.4.8.9-1~d12.bookworm+1
  • deb.torproject.org bookworm repository
  • vanguards version 0.3.1-2.3 from packages.debian.org

Also reproducible in:

  • Debian bookworm in KVM
  • Debian bookworm in a Qubes PVH VM
  • Qubes-Whonix 17 (Debian bookworm based) PVH VM
  • Non-Qubes-Whonix (Whonix for VirtualBox)

I wasn't able to reproduce this yet:

  • on a real (non-Qubes) Debian bookworm
  • Debian bookworm in a Qubes HVM VM

So it seems that only certain types of VMs (KVM, Qubes PVH, VirtaulBox) are affected. Therefore you might conclude this issue isn't caused by any software developed by The Tor Project. And you might be right about that. However, do you have any insights what code changes might have triggered this issue?

Update: A user in the forums reported having reproduced this on hardware (outside of any VMs) too.

Also reported against Qubes: Tor 0.4.8.9 broken in combination with vanguards in Qubes Debian templates

Additional information

sudo systemctl stop vanguards && sudo systemctl restart tor@default fixes this issue. This shows that this issue is only happening if Tor is combined with vanguards.

Edited by adrelanos
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information