From: "MaxF (Code Review)" Date: Tue, 19 Aug 2025 13:59:56 +0000 In-Reply-To: References: Reply-To: max@...2606..., arne-openvpn@...1227..., 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="fkMw9l7N/Aw="; charset=UTF-8 Subject: [Openvpn-devel] [M] Change in openvpn[master]: Check message id/acked ids too when doing sessionid cookie checks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: flichtenheld , openvpn-devel --fkMw9l7N/Aw= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos. MaxF has posted comments on this change. ( http://gerrit.openvpn.net/c/open= vpn/+/1067?usp=3Demail ) Change subject: Check message id/acked ids too when doing sessionid cookie = checks ...................................................................... Patch Set 6: Code-Review+2 (2 comments) File src/openvpn/mudp.c: http://gerrit.openvpn.net/c/openvpn/+/1067/comment/a89a1941_de7cae02 : PS5, Line 163: msg(D_MULTI_MEDIUM, "Packet (%s) with invalid or= missing SID from %s", : packet_opcode_name(op), peer); > This debug message may now be incorrect. The packet might have a valid SI= D, but a wrong packet ID. Done File src/openvpn/ssl_pkt.c: http://gerrit.openvpn.net/c/openvpn/+/1067/comment/333f0fff_e4904c7d : PS5, Line 518: /* Check if the packet ID of the packet or ACKED packet = is <=3D 1 */ : for (int i =3D 0; i < ack.len; i++) : { : /* This packet ACKs a packet that has a higher packe= t id than the : * ones expected in the three-way handshake, conside= r it as invalid : * for the session */ : if (ack.packet_id[i] > 1) : { : return false; : } : } : : if (!pkt_is_ack) : { : packet_id_type message_id; : /* Extract the packet ID from the packet */ : if (!reliable_ack_read_packet_id(&buf, &message_id)) : { : return false; : } : : /* similar check. Anything larger than 1 is not cons= idered part of the : * three-way handshake */ : if (message_id > 1) : { : return false; : } : } > Maybe nitpicky, but this seems like scope creep for this function. [=E2= =80=A6] Done -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1067?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: I6752dcd5aff3e5cea2b439366479e86751a1c403 Gerrit-Change-Number: 1067 Gerrit-PatchSet: 6 Gerrit-Owner: plaisthos Gerrit-Reviewer: MaxF Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-Comment-Date: Tue, 19 Aug 2025 13:59:56 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: MaxF Gerrit-MessageType: comment --fkMw9l7N/Aw= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, plaisthos.

Patch set 6:Code-Review +2=

V= iew Change

2 comments:

  • File src/openvpn/mudp.c:

  • Patch Set #5, Line 163:=

                msg(D_MULTI_MEDIUM, "Packet (%s) with in=
    valid or missing SID from %s",
    packet_opcode_name(o= p), peer);

    This debug message may now= be incorrect. The packet might have a valid SID, but a wrong packet ID.

    Do= ne

  • File src/openv= pn/ssl_pkt.c:

    • Patc= h Set #5, Line 518:

          /* Check if the packet ID of the p=
      acket or ACKED packet  is <=3D 1 */
      for (int i =3D 0; i < ack.= len; i++)
      {
      /* This packet ACKs a packet that has a highe= r packet id than the
      * ones expected in the three-way handshake= , consider it as invalid
      * for the session */
      if (ac= k.packet_id[i] > 1)
      {
      return false;
      = }
      }

      if (!pkt_is_ack)
      {
      packet_id_type = message_id;
      /* Extract the packet ID from the packet */
      = if (!reliable_ack_read_packet_id(&buf, &message_id))
      = {
      return false;
      }

      /* similar check= . Anything larger than 1 is not considered part of the
      * three-= way handshake */
      if (message_id > 1)
      {
      = return false;
      }
      }

      Maybe nitpicky, but this seems like scope creep for this function. [=E2= =80=A6]

      Done

  • To view, visit change 1067. To unsubscri= be, or for help writing mail filters, visit settings.

    Gerrit-Project: openvpn
    Gerrit-Branch: master
    Gerrit-Change-Id: I6752dcd5aff3e5cea2b43936647= 9e86751a1c403
    Gerrit-Change-Number: 1067
    Gerrit-PatchSet: 6
    Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
    Gerrit-Reviewer: MaxF <max@...2606...> <= /div>
    Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
    Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
    Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
    Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
    Gerrit-Comment-Date: Tue, 19 Aug 2025 13:59:56= +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: MaxF <max@...2606...&g= t;
    Gerrit-MessageType: comment
    --fkMw9l7N/Aw=--