site: SECURITY: Properly update full peer address array
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 15 May 2014 00:54:18 +0000 (01:54 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 15 May 2014 01:02:04 +0000 (02:02 +0100)
commit925c5ca83e5eb67604b837ce8d3e02fae2adb260
treec8c5d30b0469c3c7f4b325732313091d20afdeee
parent09aecaa2e38014fcb27d6ca146b5de9bacd0986d
site: SECURITY: Properly update full peer address array

If we already have the maximum number of peer addresses, do not
stuff the peer address into the wrong slot.

If a site instance is configured with the maximum permissible limit on
the number of mobile peer addresses (ie with mobile-peers-max set to
5), this overruns the transport peers array.  In such a configuration
this is a security problem.  It looks like a denial of service and
privilege escalation can't be ruled out.  Configurations without
mobile peers are not affected.

Otherwise it simply means the address is ignored.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
site.c