[tor-bugs] #25150 [Core Tor/Tor]: Avoid malloc/free on each server-side ntor handshake
    Tor Bug Tracker & Wiki 
    blackhole at torproject.org
       
    Mon Feb  5 19:36:00 UTC 2018
    
    
  
#25150: Avoid malloc/free on each server-side ntor handshake
-----------------------------------------+---------------------------------
 Reporter:  nickm                        |          Owner:  nickm
     Type:  enhancement                  |         Status:  needs_review
 Priority:  Medium                       |      Milestone:  Tor:
                                         |  0.3.4.x-final
Component:  Core Tor/Tor                 |        Version:
 Severity:  Normal                       |     Resolution:
 Keywords:  c99 malloc performance ntor  |  Actual Points:
Parent ID:  #23777                       |         Points:
 Reviewer:                               |        Sponsor:
-----------------------------------------+---------------------------------
Comment (by dgoulet):
 Hmm this fails with fragile hardening. I expect any distro building with
 this might end up not able to compile tor :S.
 {{{
 src/or/onion.c:532:1: error: stack protector not protecting local
 variables: variable length buffer [-Werror=stack-protector]
  onion_skin_server_handshake(int type,
 }}}
 I've looked at this and there are two callsites for
 `onion_skin_server_handshake` that both passes a stack pointer and a fixed
 length.
 Maybe we could modify the callers to pass a full buffer containing the
 keys + nonce instead?
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25150#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
    
    
More information about the tor-bugs
mailing list