[tor-bugs] #23588 [Core Tor/Tor]: Write fascist_firewall_choose_address_ls() and use it in hs_get_extend_info_from_lspecs()

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Jul 30 03:58:42 UTC 2018


#23588: Write fascist_firewall_choose_address_ls() and use it in
hs_get_extend_info_from_lspecs()
-------------------------------------------------+-------------------------
 Reporter:  teor                                 |          Owner:  neel
     Type:  defect                               |         Status:
                                                 |  needs_revision
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.3.5.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  prop224, tor-hs, single-onion,       |  Actual Points:
  ipv6, 034-triage-20180328,                     |
  034-removed-20180328                           |
Parent ID:  #23493                               |         Points:  1
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by teor):

 The Appveyor Windows CI gives a good error:

 {{{
 bash.exe : In file included from ../src/core/or/or.h:51:0,
 At line:2 char:5
 +     & $commandPath $args 2>&1
 +     ~~~~~~~~~~~~~~~~~~~~~~~~~
     + CategoryInfo          : NotSpecified: (In file
 include...e/or/or.h:51:0,:String) [], RemoteException
     + FullyQualifiedErrorId : NativeCommandError

                  from ../src/feature/hs/hs_common.c:14:
 ../src/feature/hs/hs_common.c: In function
 'hs_get_extend_info_from_lspecs':
 ../src/lib/net/address.h:308:49: error: null pointer dereference [-Werror
 =null-dereference]
          tor_addr_port_is_valid(&(ap)->addr, (ap)->port, (for_listening))
                                                  ^
 ../src/lib/net/address.h:305:29: note: in definition of macro
 'tor_addr_port_is_valid'
           tor_port_is_valid((port), (for_listening)))
                              ^~~~
 ../src/feature/hs/hs_common.c:1720:8: note: in expansion of macro
 'tor_addr_port_is_valid_ap'
    if (!tor_addr_port_is_valid_ap(ap, 0) || !have_legacy_id) {
         ^~~~~~~~~~~~~~~~~~~~~~~~~
 ../src/feature/hs/hs_common.c:1729:64: error: null pointer dereference
 [-Werror=null-dereference]
               fascist_firewall_allows_address_addr(&ap->addr, ap->port,
                                                               ~~^~~~~~
 In file included from ../src/lib/crypt_ops/crypto_rsa.h:21:0,
                  from ../src/lib/crypt_ops/crypto.h:20,
                  from ../src/core/or/or.h:30,
                  from ../src/feature/hs/hs_common.c:14:
 ../src/feature/hs/hs_common.c:1748:48: error: null pointer dereference
 [-Werror=null-dereference]
             "it: %s:%u", fmt_addr(&ap->addr), ap->port);
                                               ~~^~~
 ../src/lib/log/log.h:250:51: note: in definition of macro 'log_fn'
    log_fn_(severity, domain, __FUNCTION__, args, ##__VA_ARGS__)
                                                    ^~~~~~~~~~~
 ../src/feature/hs/hs_common.c:1755:50: error: null pointer dereference
 [-Werror=null-dereference]
                           onion_key, &ap->addr, ap->port);
                                                 ~~^~~~~~
 cc1.exe: all warnings being treated as errors
 make: *** [Makefile:8173: src/feature/hs/hs_common.o] Error 1
 make: *** Waiting for unfinished jobs....
 }}}

 https://ci.appveyor.com/project/torproject/tor/build/job/7isiro2d4mryqtr0#L1825

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


More information about the tor-bugs mailing list