[tor-bugs] #26150 [Obfuscation/BridgeDB]: legacy bridge filtering code in bridgedb is suddenly hitting errors

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon May 21 18:22:42 UTC 2018


#26150: legacy bridge filtering code in bridgedb is suddenly hitting errors
----------------------------------+--------------------------
 Reporter:  isis                  |          Owner:  isis
     Type:  defect                |         Status:  assigned
 Priority:  Immediate             |      Milestone:
Component:  Obfuscation/BridgeDB  |        Version:
 Severity:  Normal                |     Resolution:
 Keywords:  bridgedb-db           |  Actual Points:
Parent ID:                        |         Points:  1
 Reviewer:                        |        Sponsor:
----------------------------------+--------------------------
Description changed by isis:

Old description:

> {{{
> 18:11:46 DEBUG    L227:bridgerequest.justOneP() No pluggable transports
> were requested.
> [57/671]
> 18:11:46 INFO     L250:bridgerequest.generate() Adding a filter to
> HTTPSBridgeRequest for 185.220.101.13 for IPv4 bridges...
> 18:11:46 INFO     L300:distributor.getBridges() Attempting to get bridges
> for 185.220.101.13...
> 18:11:46 DEBUG    L159:distributor.getSubnet()  Client IP was within
> area: 185.220.0.0/16
> 18:11:46 DEBUG     L44:filters.bySubring()      Creating a filter for
> assigning bridges to subhashring 2-of-3...
> 18:11:46 DEBUG    L325:distributor.getBridges() Client request within
> time interval: 1526925600
> 18:11:46 DEBUG    L326:distributor.getBridges() Assigned client to
> subhashring 2/3
> 18:11:46 DEBUG    L327:distributor.getBridges() Assigned client to
> subhashring position: 726333b07ff8c62f7e44178f1b2153f28d953199
> 18:11:46 DEBUG    L328:distributor.getBridges() Total bridges: 1540
> 18:11:46 DEBUG    L329:distributor.getBridges() Bridge filters:
> bySubring2of3 byIPv4()
> 18:11:46 DEBUG    L333:distributor.getBridges() Cache hit
> frozenset([<function bySubring2of3 at 0x7f267423dde8>, <function byIPv4()
> at 0x7f267727ce60>])
> 18:11:46 DEBUG    L269:distribute.bridgesPerR() Returning 3 bridges from
> ring of len: 508
> 18:11:46 DEBUG    L330:Bridges.getBridges()     Got duplicate bridge
> '72eaf88f51eaa96e2f4cab6fc360333b598ae19b' in main hashring for position
> '726333b07ff8c62f7e44178f1b2153f28d953199'.
> 18:11:46 DEBUG    L275:Bridges.filterDistinct() Got 7 possible bridges to
> filter
> 18:11:46 ERROR    L862:server.render()          'NoneType' object has no
> attribute 'version'
> Traceback (most recent call last):
>   File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-
> packages/bridgedb-0.6.5+0.gd9741cf.dirty-
> py2.7.egg/bridgedb/distributors/https/server.py", line 860, in render
>     response = self.getBridgeRequestAnswer(request)
>   File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-
> packages/bridgedb-0.6.5+0.gd9741cf.dirty-
> py2.7.egg/bridgedb/distributors/https/server.py", line 904, in
> getBridgeRequestAnswer
>     bridges = self.distributor.getBridges(bridgeRequest, interval)
>   File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-
> packages/bridgedb-0.6.5+0.gd9741cf.dirty-
> py2.7.egg/bridgedb/distributors/https/distributor.py", line 345, in
> getBridges
>     answer = ring.getBridges(position, returnNum, filterBySubnet=True)
>   File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-
> packages/bridgedb-0.6.5+0.gd9741cf.dirty-py2.7.egg/bridgedb/Bridges.py",
> line 334, in getBridges
>     bridges = self.filterDistinctSubnets(keys)
> File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-
> packages/bridgedb-0.6.5+0.gd9741cf.dirty-py2.7.egg/bridgedb/Bridges.py",
> line 295, in filterDistinctSubnets
> if bridge.address.version == 4:
> AttributeError: 'NoneType' object has no attribute 'version'
> }}}

New description:

 {{{
 18:11:46 DEBUG     L44:filters.bySubring()      Creating a filter for
 assigning bridges to subhashring 2-of-3...
 18:11:46 DEBUG    L325:distributor.getBridges() Client request within time
 interval: 1526925600
 18:11:46 DEBUG    L326:distributor.getBridges() Assigned client to
 subhashring 2/3
 18:11:46 DEBUG    L327:distributor.getBridges() Assigned client to
 subhashring position: 726333b07ff8c62f7e44178f1b2153f28d953199
 18:11:46 DEBUG    L328:distributor.getBridges() Total bridges: 1540
 18:11:46 DEBUG    L329:distributor.getBridges() Bridge filters:
 bySubring2of3 byIPv4()
 18:11:46 DEBUG    L333:distributor.getBridges() Cache hit
 frozenset([<function bySubring2of3 at 0x7f267423dde8>, <function byIPv4()
 at 0x7f267727ce60>])
 18:11:46 DEBUG    L269:distribute.bridgesPerR() Returning 3 bridges from
 ring of len: 508
 18:11:46 DEBUG    L330:Bridges.getBridges()     Got duplicate bridge
 '72eaf88f51eaa96e2f4cab6fc360333b598ae19b' in main hashring for position
 '726333b07ff8c62f7e44178f1b2153f28d953199'.
 18:11:46 DEBUG    L275:Bridges.filterDistinct() Got 7 possible bridges to
 filter
 18:11:46 ERROR    L862:server.render()          'NoneType' object has no
 attribute 'version'
 Traceback (most recent call last):
   File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.6.5+0.gd9741cf.dirty-
 py2.7.egg/bridgedb/distributors/https/server.py", line 860, in render
     response = self.getBridgeRequestAnswer(request)
   File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.6.5+0.gd9741cf.dirty-
 py2.7.egg/bridgedb/distributors/https/server.py", line 904, in
 getBridgeRequestAnswer
     bridges = self.distributor.getBridges(bridgeRequest, interval)
   File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.6.5+0.gd9741cf.dirty-
 py2.7.egg/bridgedb/distributors/https/distributor.py", line 345, in
 getBridges
     answer = ring.getBridges(position, returnNum, filterBySubnet=True)
   File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.6.5+0.gd9741cf.dirty-py2.7.egg/bridgedb/Bridges.py",
 line 334, in getBridges
     bridges = self.filterDistinctSubnets(keys)
 File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-
 packages/bridgedb-0.6.5+0.gd9741cf.dirty-py2.7.egg/bridgedb/Bridges.py",
 line 295, in filterDistinctSubnets
 if bridge.address.version == 4:
 AttributeError: 'NoneType' object has no attribute 'version'
 }}}

--

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


More information about the tor-bugs mailing list