]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Fix SIGSEGV (NULL deref) receiving push "echo"
authorMatthias Andree <matthias.andree@gmx.de>
Thu, 3 Jun 2021 12:30:19 +0000 (14:30 +0200)
committerGert Doering <gert@greenie.muc.de>
Thu, 3 Jun 2021 14:37:28 +0000 (16:37 +0200)
commitd6e21bed964109abaf4bf03a951dc2fc9b1d5c1f
treeaf21c3ea9f7d62da36f54be5083eb2cf5d70feb3
parent3ea57e0c46a922ac87295769283b7691e2dcbdd3
Fix SIGSEGV (NULL deref) receiving push "echo"

A server pushing "echo" without arguments can crash the client.
In such a situation, the code in question receives p[1] == NULL
(which was CLEAR(p)'ed above), hands it strncmp, which then
dereferences the null pointer.

Original report and analysis here:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256331

Fixes: Trac #1409
Reported-by: peo@nethead.se (to FreeBSD)
Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20210603123019.422644-1-matthias.andree@gmx.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22486.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 0033811e0215af76f469d78912c95a2f59813454)
src/openvpn/options.c