From: "cron2 (Code Review)" Date: Fri, 14 Nov 2025 18:39:24 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., gianmarco@...2726..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <9ed895c385f85296a839019d55496e9ddf0799cc-EmailReviewComments-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="V/DHvTMfTbY="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: mudp: fix unaligned 32-bit read when parsing peer ID List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: its_Giaan Cc: flichtenheld , plaisthos , openvpn-devel --V/DHvTMfTbY= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: its_Giaan, plaisthos. cron2 has posted comments on this change by its_Giaan. ( http://gerrit.open= vpn.net/c/openvpn/+/1348?usp=3Demail ) Change subject: mudp: fix unaligned 32-bit read when parsing peer ID ...................................................................... Patch Set 1: (1 comment) File src/openvpn/mudp.c: http://gerrit.openvpn.net/c/openvpn/+/1348/comment/3f419bdf_37dbf5a2?usp=3D= email : PS1, Line 213: memcpy(&tmp, ptr, sizeof(tmp)); > This reimplements the same logic as buf_read_u32() except that it doesn't= advance the buffer. [=E2=80=A6] I am thinking of something more straightforward... ``` /* peer_id is a 24 byte integer in network byte order */ peer_id =3D (ptr[1]<<16) + (ptr[2]<<8) + ptr[3] ``` (or the other way round, didn't do the byte order calculations yet)... -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1348?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: comment Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Id0bb4c45d373437ab8dbaff7a311745f9b538cbf Gerrit-Change-Number: 1348 Gerrit-PatchSet: 1 Gerrit-Owner: its_Giaan Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: cron2 Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: its_Giaan Gerrit-Comment-Date: Fri, 14 Nov 2025 18:39:24 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: flichtenheld --V/DHvTMfTbY= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: its_Giaan, plaisthos.

View = Change

1 comment:

    =
  • File src/openvpn/mudp.c:

    • Patch Set #1, Li= ne 213: mem= cpy(&tmp, ptr, sizeof(tmp));

      This reimplements th= e same logic as buf_read_u32() except that it doesn't advance the buffe= r. [=E2=80=A6]

      I am thinking of something more straightfor= ward...

      ```
      /* peer_id is a 24 byte integer in network byte order */=
      peer_id =3D (ptr[1]<<16) + (ptr[2]<<8) + ptr[3]
      ```

      <= p class=3D"blocks" style=3D"white-space: pre-wrap; word-wrap: break-word;">= (or the other way round, didn't do the byte order calculations yet)...<= /p>

To view, visit change 1348. To unsubscribe, or for he= lp writing mail filters, visit settings.

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Id0bb4c45d373437ab8dbaff7a31= 1745f9b538cbf
Gerrit-Change-Number: 1348
Gerrit-PatchSet: 1
Gerrit-Owner: its_Giaan <gianmarco@...2786...= ..>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: cron2 <gert@...1296...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: its_Giaan <gianmarco@...1665...= 726...>
Gerrit-Comment-Date: Fri, 14 Nov 2025 18:39:24= +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: flichtenheld <frank@...1186...= .2641...>
= --V/DHvTMfTbY=--