From: "cron2 (Code Review)" Date: Sat, 8 Mar 2025 11:32:46 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., heiko@...515..., openvpn-devel@lists.sourceforge.net, frank@...2641..., lstipakov@...277..., a@...2181... Message-ID: <8d4c9ca0b24f473f427c0da64873e37be8913695-EmailReviewComments-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="xYliaafqx2o="; charset=UTF-8 Subject: [Openvpn-devel] [M] Change in openvpn[master]: Implement override-username List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: d12fk , stipa , flichtenheld , openvpn-devel --xYliaafqx2o= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, ordex, plaisthos, stipa. cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/ope= nvpn/+/872?usp=3Demail ) Change subject: Implement override-username ...................................................................... Patch Set 8: (4 comments) Patchset: PS8: one minor nit (manpage), one major nit (*boom*). File doc/man-sections/server-options.rst: http://gerrit.openvpn.net/c/openvpn/+/872/comment/69b22c75_363de9cc : PS8, Line 421: --override-username this is missing the "username" argument http://gerrit.openvpn.net/c/openvpn/+/872/comment/e1365250_cc8b4a6a : PS8, Line 428: Also ``username-as-common-name`` will use the client provi= ded username `--` missing before `username-as-common-name`, while all other opions refer= enced have it File src/openvpn/multi.c: http://gerrit.openvpn.net/c/openvpn/+/872/comment/d4cf5d2c_a9aa9911 : PS8, Line 2692: && strcmp(multi->locked_username, options->override= _username) !=3D 0) I managed to SIGSEGV this on client connect... ``` #0 0x00007ffff7913ceb in ?? () from /lib64/libc.so.6 #1 0x0000555555594699 in override_locked_username (mi=3Dmi@...1851...=3D0x= 555555709dc0) at multi.c:2698 #2 0x00005555555983d2 in multi_connection_established (m=3D0x7fffffffc490, ... (gdb) print multi->locked_original_username $1 =3D 0x0 (gdb) print multi->locked_username $2 =3D 0x0 (gdb) print options->override_username $3 =3D 0x55555570f658 "MyUsernameFromCCD" ``` the config is set up for testing - it has `auth-gen-token` in the main conf= ig, and `override-username mumble` in the client's CCD/. It does not have = `auth-user-pass-verify` or `auth-user-pass-*` in the config. (The original config had `auth-user-pass-optional` + an `auth-user-pass-ver= ify script`, but for the test I did not want the script, and openvpn disall= owed having "just auth-user-pass[-optional] without a verify method"... so = I removed the other one too) -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/872?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ia4095518d5e4447992a2974e0d7a159d79ba6b6f Gerrit-Change-Number: 872 Gerrit-PatchSet: 8 Gerrit-Owner: plaisthos Gerrit-Reviewer: d12fk Gerrit-Reviewer: flichtenheld Gerrit-CC: cron2 Gerrit-CC: openvpn-devel Gerrit-CC: ordex Gerrit-CC: stipa Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-Attention: ordex Gerrit-Attention: stipa Gerrit-Comment-Date: Sat, 08 Mar 2025 11:32:46 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment --xYliaafqx2o= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, ordex, plaisthos, s= tipa.

View C= hange

4 comments:

    =
  • Patchset:

    • Patch Set #8:

      one minor nit (manpage), one major nit (*boom*).<= /p>

  • File doc/man-sect= ions/server-options.rst:

      Patch Set #8, Line 421: --override-username

      this is missing the "username" argument

      <= /li>
    • Patch Set #8, Line 428: Also ``username-as-common-name`` will use the client provid= ed username

      `--` missing before `username-as-common-name`, while all other opions= referenced have it

  • =

    File src/openvpn/multi.c:

    • Patch Set #8, Line 2692: && strcmp(multi->locked_username, options-&g= t;override_username) !=3D 0)

      I managed to SIGSEGV this on client connect...

      ```#0 0x00007ffff7913ceb in ?? () from /lib64/libc.so.6
      #1 0x0000555555= 594699 in override_locked_username (mi=3Dmi@...1851...=3D0x555555709dc0) at multi.c:2698
      #2 0x00005555555983d2 in multi_connection_establis= hed (m=3D0x7fffffffc490,
      ...
      (gdb) print multi->locked_original_u= sername
      $1 =3D 0x0
      (gdb) print multi->locked_username
      $2 =3D 0x= 0
      (gdb) print options->override_username
      $3 =3D 0x55555570f658 &qu= ot;MyUsernameFromCCD"
      ```

      the config is set up for testing - it has `auth-gen-= token` in the main config, and `override-username mumble` in the client'= ;s CCD/. It does not have `auth-user-pass-verify` or `auth-user-pass-*` in= the config.

      = (The original config had `auth-user-pass-optional` + an `auth-user-pass-ver= ify script`, but for the test I did not want the script, and openvpn disall= owed having "just auth-user-pass[-optional] without a verify method&qu= ot;... so I removed the other one too)

To view, v= isit chan= ge 872. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ia4095518d5e4447992a2974e0d7= a159d79ba6b6f
Gerrit-Change-Number: 872
Gerrit-PatchSet: 8
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-Reviewer: d12fk <heiko@...515...>=
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-CC: cron2 <gert@...1296...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-CC: ordex <a@...2181...>
Gerrit-CC: stipa <lstipakov@...277...> <= /div>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-Attention: ordex <a@...2181...> <= /div>
Gerrit-Attention: stipa <lstipakov@...1663...= .>
Gerrit-Comment-Date: Sat, 08 Mar 2025 11:32:46= +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
--xYliaafqx2o=--