From: "cron2 (Code Review)" Date: Thu, 24 Oct 2024 18:41:55 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., samuli@...515..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="fKz9OUlLyH8="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: t_server_null: forcibly kill misbehaving servers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: mattock Cc: plaisthos , flichtenheld , openvpn-devel --fKz9OUlLyH8= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, mattock, plaisthos. cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/ope= nvpn/+/775?usp=3Demail ) Change subject: t_server_null: forcibly kill misbehaving servers ...................................................................... Patch Set 5: Code-Review-2 (2 comments) Patchset: PS5: It fails to see "does the process still live?" due to `ps -p`, see comment = at the corresponding line. Changing that to `RUN_SUDO kill -0 $SERVER_PID = 2>/dev/null` yields the desired result (server hacked to maliciously ignore= SIGTERM 2x) ``` Waiting for servers to exit ERROR: had to send SIGKILL to server with pid 10186! ERROR: had to send SIGKILL to server with pid 10189! FAIL: t_server_null.sh ``` now, while at it, we should actually print which server is "10186" and "101= 89" so it's easier to find the right log... File tests/t_server_null_server.sh: http://gerrit.openvpn.net/c/openvpn/+/775/comment/3af78b34_8263c5b3 : PS5, Line 100: ps -p "${SERVER_PID}" > /dev/null || break this does not work on systems where root processes are not visible to norma= l users, like "FreeBSD with `security.bsd.see_other_uids=3D0`" set. We've = been here before - testing for "does the process still live?" needs to be d= one with `$RUN_SUDO kill -0 $SERVER_PID` -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/775?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: Ic0f98cd3b87a7b86e032e63167ac9036f7c08fcb Gerrit-Change-Number: 775 Gerrit-PatchSet: 5 Gerrit-Owner: mattock Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-Attention: mattock Gerrit-Comment-Date: Thu, 24 Oct 2024 18:41:55 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment --fKz9OUlLyH8= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, mattock, plaisthos.=

Patch set 5:Code-Review -2=

Vi= ew Change

2 comments:

  • Patchset:

    • Patch Set #5:

      It fails to see "does the process still = live?" due to `ps -p`, see comment at the corresponding line. Changin= g that to `RUN_SUDO kill -0 $SERVER_PID 2>/dev/null` yields the desired = result (server hacked to maliciously ignore SIGTERM 2x)

      ```
      Waiting for servers to ex= it
      ERROR: had to send SIGKILL to server with pid 10186!
      ERROR: had to= send SIGKILL to server with pid 10189!
      FAIL: t_server_null.sh
      ```

      now, while at i= t, we should actually print which server is "10186" and "101= 89" so it's easier to find the right log...

  • File tests/t_server_null_server.sh:

    =
    • Patch Set #5, Line 100= : ps -p "$= {SERVER_PID}" > /dev/null || break

      this does not work on systems where ro= ot processes are not visible to normal users, like "FreeBSD with `secu= rity.bsd.see_other_uids=3D0`" set. We've been here before - testi= ng for "does the process still live?" needs to be done with `$RUN= _SUDO kill -0 $SERVER_PID`

To view, visit change 775. = To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ic0f98cd3b87a7b86e032e63167a= c9036f7c08fcb
Gerrit-Change-Number: 775
Gerrit-PatchSet: 5
Gerrit-Owner: mattock <samuli@...515...>=
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-Attention: mattock <samuli@...515...= >
Gerrit-Comment-Date: Thu, 24 Oct 2024 18:41:55= +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
--fKz9OUlLyH8=--