[tor-bugs] #19196 [Core Tor/Tor]: [prop250] Shared random version parsing fails on 32 bit

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat May 28 11:23:05 UTC 2016


#19196: [prop250] Shared random version parsing fails on 32 bit
------------------------------+--------------------------------
     Reporter:  teor          |      Owner:
         Type:  defect        |     Status:  new
     Priority:  Medium        |  Milestone:
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:  tor-hs, regression
Actual Points:                |  Parent ID:  #16943
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+--------------------------------
 In dgoulet's srv-testing-2, git 0234595:

 The original patch to sr_parse_commit was:
 {{{
 -  version = (uint32_t) tor_parse_long(value, 10, 1, UINT32_MAX, NULL,
 NULL);
 +  version = (uint32_t) tor_parse_ulong(value, 10, 1, UINT32_MAX, NULL,
 NULL);
 }}}

 Since this is a regression, it's worth noting that the unit test `shared-
 random/sr_commit` tests version parsing as part of commit parsing. It will
 fail on 32 bit platforms if we make this mistake again. (I can't see any
 way to make it fail on 64-bit platforms - using fixed-size integers with a
 function that takes platform-dependent-size integers is inherently error-
 prone, see #19063.)

 Also, since this is a regression, can you please make sure that no other
 patches from the last few comments in #16943 were dropped?

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


More information about the tor-bugs mailing list