[tor-bugs] #28961 [Core Tor/Stem]: exception in descriptor/remote.py downloading large server descriptors via orport

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Dec 30 04:46:24 UTC 2018


#28961: exception in descriptor/remote.py downloading large server descriptors via
orport
-----------------------+-------------------------------
 Reporter:  starlight  |          Owner:  atagar
     Type:  defect     |         Status:  new
 Priority:  Medium     |      Component:  Core Tor/Stem
  Version:             |       Severity:  Normal
 Keywords:             |  Actual Points:
Parent ID:             |         Points:
 Reviewer:             |        Sponsor:
-----------------------+-------------------------------
 `download_descriptor.py` works ok when descriptors are short:

 {{{
 bash-4.1$ python3 download_descriptor.py --orport 45.59.127.53:443 -f
 A0ECF41498288C3BFA33005B7C92BC791B06AB77
 Downloading server descriptor from 45.59.127.53:443...

 router erosi 45.59.127.53 443 0 80
 identity-ed25519
 -----BEGIN ED25519 CERT-----
 AQQABo/EAV5E1oAtsNKuEr2iE+FhLa5WSYx+pK1VVAUrFANbbu6yAQAgBABnngvA
 .
 .
 .
 }}}

 not so when they are long:

 {{{
 bash-4.1$ python3 download_descriptor.py --orport 199.249.230.82:443 -f
 A0DB820FEC87C0405F7BF05DEE5E4ADED2BB9904
 Downloading server descriptor from 199.249.230.82:443...

 Traceback (most recent call last):
   File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py",
 line 560, in _download_descriptors
     self.content, self.reply_headers = _download_from_orport(endpoint,
 self.compression, self.resource)
   File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py",
 line 969, in _download_from_orport
     response = b''.join([cell.data for cell in
 circ.send(RelayCommand.DATA, request, stream_id = 1)])
   File "/usr/local/lib/python3.7/site-packages/stem/client/__init__.py",
 line 262, in send
     raise stem.ProtocolError('Circuit response should be a series of RELAY
 cells, but received an unexpected size for a response: %i' % len(reply))
 stem.ProtocolError: Circuit response should be a series of RELAY cells,
 but received an unexpected size for a response: 4048

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py",
 line 560, in _download_descriptors
     self.content, self.reply_headers = _download_from_orport(endpoint,
 self.compression, self.resource)
   File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py",
 line 969, in _download_from_orport
     response = b''.join([cell.data for cell in
 circ.send(RelayCommand.DATA, request, stream_id = 1)])
   File "/usr/local/lib/python3.7/site-packages/stem/client/__init__.py",
 line 262, in send
     raise stem.ProtocolError('Circuit response should be a series of RELAY
 cells, but received an unexpected size for a response: %i' % len(reply))
 stem.ProtocolError: Circuit response should be a series of RELAY cells,
 but received an unexpected size for a response: 4048

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "download_descriptor.py", line 133, in <module>
     main()
   File "download_descriptor.py", line 115, in main
     endpoints = [args.download_from],
   File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py",
 line 484, in run
     return list(self._run(suppress))
   File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py",
 line 495, in _run
     raise self.error
   File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py",
 line 560, in _download_descriptors
     self.content, self.reply_headers = _download_from_orport(endpoint,
 self.compression, self.resource)
   File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py",
 line 969, in _download_from_orport
     response = b''.join([cell.data for cell in
 circ.send(RelayCommand.DATA, request, stream_id = 1)])
   File "/usr/local/lib/python3.7/site-packages/stem/client/__init__.py",
 line 262, in send
     raise stem.ProtocolError('Circuit response should be a series of RELAY
 cells, but received an unexpected size for a response: %i' % len(reply))
 stem.ProtocolError: Circuit response should be a series of RELAY cells,
 but received an unexpected size for a response: 4048
 ]}}

 unencrypted no problem:

 {{{
 bash-4.1$ python3 download_descriptor.py --dirport 199.249.230.82:80 -f
 A0DB820FEC87C0405F7BF05DEE5E4ADED2BB9904
 Downloading server descriptor from 199.249.230.82:80...

 router QuintexAirVPN29 199.249.230.82 443 0 80
 identity-ed25519
 -----BEGIN ED25519 CERT-----
 AQQABo5iATaZrxEunmfnvKy6Y+5N5M7B7+8ofuFMdtlmcBDX+/QFAQAgBAAmRN42
 .
 .
 .
 }}}

 versions:

 libffi-3.2.1
 Python-3.7.1
 python-cryptography-2.4.2
 openssl-1.0.2
 stem-20181216-git0EB8FDA3

 https://stem.torproject.org/tutorials/examples/download_descriptor.html as
 of date ticket opened

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/28961>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list