[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #13111 [Tor]: Tor fails to start if onion keys are zero length
#13111: Tor fails to start if onion keys are zero length
---------------------+---------------------
Reporter: ioerror | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: Tor | Version:
Keywords: | Actual Points:
Parent ID: | Points:
---------------------+---------------------
I'm using a very unstable embedded device to run a transparent Tor
router/relay/hidden service. In some cases - the device will reset the
clock to 1970 (hooray, no RTC!) or the clock will be otherwise incorrect
(hooray, low battery on the RTC!). Furthermore, the device will sometimes
be unplugged at random (solar panel dies, janitor unplugs it, etc) and
this results in a state/keys directory that looks like as follows:
{{{
Sep 10 13:31:48.000 [notice] Tor 0.2.4.23 (git-417f0cacd726e549) opening
log file.
Sep 10 13:31:48.000 [notice] Not disabling debugger attaching for
unprivileged users.
Sep 10 13:31:48.000 [notice] Parsing GEOIP IPv4 file /usr/share/tor/geoip.
Sep 10 13:31:48.000 [notice] Parsing GEOIP IPv6 file
/usr/share/tor/geoip6.
Sep 10 13:31:49.000 [notice] Configured to measure statistics. Look for
the *-stats files that will first be written to the data directory in 24
hours from now.
Sep 10 13:31:49.000 [warn] crypto error while Error parsing private key:
no start line (in PEM routines:PEM_read_bio)
Sep 10 13:31:49.000 [err] Error loading private key.
Sep 10 13:31:49.000 [err] do_main_loop(): Bug: Error initializing keys;
exiting
}}}
{{{
root@debian:/var/lib/tor/keys# ls -al
total 20
drwx--S--- 2 debian-tor debian-tor 4096 Aug 15 14:56 .
drwx--S--- 5 debian-tor debian-tor 4096 Sep 10 13:31 ..
-rw------- 1 debian-tor debian-tor 887 Sep 10 13:30 secret_id_key
-rw------- 1 debian-tor debian-tor 0 Sep 10 13:30 secret_onion_key
-rw------- 1 debian-tor debian-tor 891 Sep 10 13:30 secret_onion_key.old
-rw------- 1 debian-tor debian-tor 0 Sep 10 13:30 secret_onion_key_ntor
-rw------- 1 debian-tor debian-tor 96 Sep 10 13:30
secret_onion_key_ntor.old
}}}
If I remove the zero byte files and restart Tor, all is well:
{{{
root@debian:/var/lib/tor/keys# rm secret_onion_key*
/etc/init.d/tor restart
}}}
I think that Tor should notice that the files are zero bytes in length and
gracefully generate the keys.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13111>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs