Change in openvpn[master]: socks: Fix wrong success check in socks_username_password_auth
A message that is not in the archive (sent off-list or not yet received): gerrit.1768227561000.I13b411fb3e8b913ae049c6ca8a1cf5a2edbab0fb@...2715...
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1466?usp=email
to review the following change.
Change subject: socks: Fix wrong success check in socks_username_password_auth
......................................................................
socks: Fix wrong success check in socks_username_password_auth
Due to wrong boolean operator the function did not correctly detect when the authentication failed.
Github: openvpn-private-issues#4
---
M src/openvpn/socks.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/66/1466/1
src/openvpn/socks.c +1 -1
@@ -143,7 +143,7 @@ }/* VER = 5, SUCCESS = 0 --> auth success */ -if (buf[0 ] !=5 && buf[1 ] !=0 ) +if (buf[0 ] !=5 || buf[1 ] !=0 ) {msg (D_LINK_ERRORS ,"socks_username_password_auth: server refused the authentication" ); goto cleanup;
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1466?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I13b411fb3e8b913ae049c6ca8a1cf5a2edbab0fb
Gerrit-Change-Number: 1466
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Attention is currently required from: flichtenheld, plaisthos.
cron2 has posted comments on this change by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1466?usp=email )
Change subject: socks: Fix wrong success check in socks_username_password_auth
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1466?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I13b411fb3e8b913ae049c6ca8a1cf5a2edbab0fb
Gerrit-Change-Number: 1466
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Mon, 12 Jan 2026 18:02:48 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
PATCH 1/1 socks: Fix wrong success check in socks_username_password_auth
In reply to a message not in the archiveFrom: Frank Lichtenheld <[email protected]...>
Due to wrong boolean operator the function did not correctly detect when the authentication failed.
Github: openvpn-private-issues#4
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1466
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1466
This mail reflects revision 1 of this Change.
Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>
src/openvpn/socks.c +1 -1
@@ -143,7 +143,7 @@ }/* VER = 5, SUCCESS = 0 --> auth success */ -if (buf[0 ] !=5 && buf[1 ] !=0 ) +if (buf[0 ] !=5 || buf[1 ] !=0 ) {msg (D_LINK_ERRORS ,"socks_username_password_auth: server refused the authentication" ); goto cleanup;
[Openvpn-devel] [PATCH applied] Re: socks: Fix wrong success check in socks_username_password_auth
"Ooops". Change makes sense.
Basically auth success is "(buf[0] == 5 && buf[1] == 0)", so auth fail needs to properly negate that... and this patch does.
Not tested beyond BB socks proxy t_client uses - which do not excercise the "auth fail" case, and the "auth succeed" case still works.
Your patch has been applied to the master branch.
commit d104917e34be43890a86c532329780037e419085
Author: Frank Lichtenheld Date: Mon Jan 12 19:02:56 2026 +0100
socks: Fix wrong success check in socks_username_password_auth
Signed-off-by: Frank Lichtenheld <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1466
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg35219.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
cron2 has uploaded a new patch set (#2) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1466?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by cron2
Change subject: socks: Fix wrong success check in socks_username_password_auth
......................................................................
socks: Fix wrong success check in socks_username_password_auth
Due to wrong boolean operator the function did not correctly detect when the authentication failed.
Github: openvpn-private-issues#4
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1466
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg35219.html
---
M src/openvpn/socks.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/66/1466/2
src/openvpn/socks.c +1 -1
@@ -143,7 +143,7 @@ }/* VER = 5, SUCCESS = 0 --> auth success */ -if (buf[0 ] !=5 && buf[1 ] !=0 ) +if (buf[0 ] !=5 || buf[1 ] !=0 ) {msg (D_LINK_ERRORS ,"socks_username_password_auth: server refused the authentication" ); goto cleanup;
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1466?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I13b411fb3e8b913ae049c6ca8a1cf5a2edbab0fb
Gerrit-Change-Number: 1466
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1466?usp=email )
Change subject: socks: Fix wrong success check in socks_username_password_auth
......................................................................
socks: Fix wrong success check in socks_username_password_auth
Due to wrong boolean operator the function did not correctly detect when the authentication failed.
Github: openvpn-private-issues#4
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1466
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg35219.html
---
M src/openvpn/socks.c
1 file changed, 1 insertion(+), 1 deletion(-)
src/openvpn/socks.c +1 -1
@@ -143,7 +143,7 @@ }/* VER = 5, SUCCESS = 0 --> auth success */ -if (buf[0 ] !=5 && buf[1 ] !=0 ) +if (buf[0 ] !=5 || buf[1 ] !=0 ) {msg (D_LINK_ERRORS ,"socks_username_password_auth: server refused the authentication" ); goto cleanup;
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1466?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I13b411fb3e8b913ae049c6ca8a1cf5a2edbab0fb
Gerrit-Change-Number: 1466
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>