public inbox for nncp-devel@lists.cypherpunks.ru
Atom feed
From: John Goerzen <jgoerzen@complete•org>
To: nncp-devel@lists.cypherpunks.ru
Subject: segfault with areas
Date: Sat, 07 Aug 2021 16:12:48 -0500	[thread overview]
Message-ID: <87sfzluffz.fsf@complete.org> (raw)

Hi Sergey,

I am wanting to set up an area where only one node is authorized 
to create packets bound for it, but a bunch of nodes can receive 
those packets.  I thought I might do so by distributing the prv 
line of the area to every node, but keeping the pub line to only 
the node authorized to send.  It is a bit counter-intuitive to how 
one normally shares the keys, but in this case what I'm trying to 
do is set up an automatic distribution of the nodelist and I want 
it to occur from onlyh a trusted source, and the file itself isn't 
particularly sensitive.

I believe this is working as intended and I would like the 
behavior to remain.

In testing, I thought "what would happen if I try to nncp-exec 
area:nodelist newnodelist on a box that doesn't have the pub line 
for the area?"  I expected an error.  Got a segfault instead:

[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 
pc=0x5ca1cb]

goroutine 11 [running]:
go.cypherpunks.ru/nncp/v7.(*Ctx).Tx.func2(0xc000116f00, 
0xc00001d200, 0x60, 0xc000019420, 0xc000166240, 0xc00001a1e0, 
0xc00001a180, 0x12, 0x0, 0x65c8a0, ...)
	/home/nncp/nncp-7.5.0/src/tx.go:139 +0x2cb
created by go.cypherpunks.ru/nncp/v7.(*Ctx).Tx
	/home/nncp/nncp-7.5.0/src/tx.go:124 +0x538

This is on v7.5.0.

I think the overall behavior is correct - it should be able to 
receive but not send if it has only prv, to send but not receive 
if it has only pub, both if it has both, and neither if it has 
neither - but probably the segfault wasn't what was intended.

Thanks!

- John

             reply	other threads:[~2021-08-07 21:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-07 21:12 John Goerzen [this message]
2021-08-07 21:41 ` segfault with areas Sergey Matveev
2021-08-08  3:10   ` John Goerzen
2021-08-08  8:52 ` Areas authorization Sergey Matveev