SIGSEGV when familykeydir is not reabable to the tor user
Summary
When tor has no read permissions on the family key directory it ends in SIGSEGV.
When tor has read permissions on the directory but not on the file, tor exits properly.
Steps to reproduce:
torrc :
...
FamilyKeyDirectory /path/to/keydir
FamilyId *
...
do not give tor read permissions on the keydir.
start tor.
What is the current bug behavior?
Unable to list contents of directory /path/to/keydir
Tor 0.4.9.1-alpha-dev died: Caught signal 11
/usr/bin/tor(+0xec14a)[0x55b50d86c14a]
/usr/bin/tor(+0xaa135)[0x55b50d82a135]
/usr/bin/tor(+0xaa135)[0x55b50d82a135]
/usr/bin/tor(list_family_key_files+0xb8)[0x55b50d82b538]
/usr/bin/tor(+0x6a4d2)[0x55b50d7ea4d2]
/usr/bin/tor(tor_run_main+0xf1)[0x55b50d7ecf51]
/usr/bin/tor(tor_main+0x59)[0x55b50d7e92d9]
/usr/bin/tor(main+0x19)[0x55b50d7e8e99]
/lib/x86_64-linux-gnu/libc.so.6(+0x2724a)[0x7fb7004ba24a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85)[0x7fb7004ba305]
/usr/bin/tor(_start+0x21)[0x55b50d7e8ee1]
What is the expected behavior?
Could not open "/path/to/keydir": Permission denied
Error initializing keys; exiting
Environment
0.4.9.1-alpha-dev-20250402T020456Z-1~d12.bookworm+1
on debian stable
Edited by nusenu