]> Cypherpunks.ru repositories - nncp.git/commitdiff
Correct identification during authentication procedure
authorSergey Matveev <stargrave@stargrave.org>
Fri, 13 Dec 2019 15:11:49 +0000 (18:11 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Fri, 13 Dec 2019 15:47:08 +0000 (18:47 +0300)
doc/news.ru.texi
doc/news.texi
src/sp.go

index 54dbe00ac779994f57ee00a66e8434efbdedddcf..237af0fbde01a220a31ce2ae776df8d2d1e3e7df 100644 (file)
@@ -5,6 +5,11 @@
 @subsection Релиз 5.1.2
 @itemize
 
+@item
+Исправлена @strong{критичная} уязвимость: аутентификация online нод
+могла приводить к некорректной идентификации удалённой стороны, позволяя
+скачивать чужие зашифрованные пакеты.
+
 @item
 Исправлена ошибка: в новосозданных конфигурационных файлах, приватный
 публичный ключ Noise были поменяны местами, что приводило к
index 85095ba06a9db9332eede2f19287a6958857cbe7..62759802b3263c52e89d50c7ccfea40450d9c356 100644 (file)
@@ -7,6 +7,11 @@ See also this page @ref{Новости, on russian}.
 @section Release 5.1.2
 @itemize
 
+@item
+@strong{Critical} vulnerability: remote peers authentication could lead
+to incorrect identification of remote side, allowing foreign encrypted
+packets downloading.
+
 @item
 Bugfix: private and public Noise keys were swapped in newly created
 configuration files, that lead to inability to authenticate online peers.
index b6e49b415e06b8f9f7a9b65f5079ff25e7d16dd6..c5cfb07452a0452f4d766ee0328e24411f51158c 100644 (file)
--- a/src/sp.go
+++ b/src/sp.go
@@ -415,8 +415,9 @@ func (state *SPState) StartR(conn ConnDeadlined) error {
        }
 
        var node *Node
-       for _, node = range state.Ctx.Neigh {
-               if subtle.ConstantTimeCompare(state.hs.PeerStatic(), node.NoisePub[:]) == 1 {
+       for _, n := range state.Ctx.Neigh {
+               if subtle.ConstantTimeCompare(state.hs.PeerStatic(), n.NoisePub[:]) == 1 {
+                       node = n
                        break
                }
        }