[tor-bugs] #9804 [Stem]: _set_argv on FreeBSD corrupts the environment

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Sep 22 23:40:20 UTC 2013


#9804: _set_argv on FreeBSD corrupts the environment
-------------------------------------------------+-------------------------
 Reporter:  philip                               |          Owner:  atagar
     Type:  defect                               |         Status:  new
 Priority:  normal                               |      Milestone:
Component:  Stem                                 |        Version:
 Keywords:  freebsd arm environment corrupt      |  Actual Points:
  efault                                         |         Points:
Parent ID:                                       |
-------------------------------------------------+-------------------------
 I've not had much time to debug this, but I figured I'd file a ticket so
 it doesn't get lost.  If I find time to debug further, I'll update this
 ticket.

 Observed on stem aee7de8, with arm 853bf8b

 On FreeBSD, arm will break in many ways because _set_argv clobbers the
 environment:

  - os.putenv(LANG...) will fail because the environment is corrupt and
 Python will stop with EFAULT
  - If you manage to get past that, every system() call will fail because
 of unexpected input on stderr (sh: environment corrupt; missing value for
 [sic])

 At first guess, the check for > _MAX_NAME_LEN in get_process_name() is
 probably incorrect.

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


More information about the tor-bugs mailing list