From: "syzzer (Code Review)" Date: Fri, 12 Apr 2024 20:01:02 +0000 In-Reply-To: References: Reply-To: steffan@...1856..., 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="7PonoMt/cVc="; charset=UTF-8 Subject: [Openvpn-devel] [M] Change in openvpn[master]: Implement support for AEAD tag at the end List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: flichtenheld , openvpn-devel --7PonoMt/cVc= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: plaisthos. syzzer has posted comments on this change. ( http://gerrit.openvpn.net/c/op= envpn/+/506?usp=3Demail ) Change subject: Implement support for AEAD tag at the end ...................................................................... Patch Set 4: Code-Review-1 (5 comments) Patchset: PS4: I have always supported to place the tag at the end. It's easier to manage = in hardware, is common practice and has no security impact. The only real reservation I have is whether this should be combined with ot= her protocol changes to prevent an explosion of possible wire formats. For = example with a longer on-the-wire IV. Combining these would results in 2 po= ssible AEAD wire formats, instead of 4. (Or 8, if there are plans for a lon= ger peer-id, but not sure if that was just a typo in v1 or actually planned= ). (And then there are a few nits, see comments.) File src/openvpn/crypto.c: http://gerrit.openvpn.net/c/openvpn/+/506/comment/6e399d5e_d094230c : PS1, Line 426: uint8_t *tag_ptr =3D NULL; Not sure if the current static analyzers are smart enough to detect that th= ese (non-const) variables are not used inside the error_exit label, but the= y used to complain about jumping over an initialization. (What CRYPTO_ERROR= above does.) http://gerrit.openvpn.net/c/openvpn/+/506/comment/281413d5_d34e727f : PS1, Line 463: ASSERT(buf_inc_len(&work, outlen)); Good to add a newline to visually separate the decryption from the authenti= cation, but the buf_inc_len belongs to the decryption bit, right? Not the a= uthentication bit. File src/openvpn/ssl.h: http://gerrit.openvpn.net/c/openvpn/+/506/comment/9b25b8a6_547ed983 : PS1, Line 111: #define IV_PROTO_DATA_V3 (1<<10) This means that this commit can only go in together with commits for a larg= er peer id and larger IV, right? File tests/unit_tests/openvpn/test_ssl.c: http://gerrit.openvpn.net/c/openvpn/+/506/comment/05d64456_0a9f2c26 : PS4, Line 272: run_data_channel_with_cipher_end(const char *cipher) s/end/tag_end/ ? (Or even tag_at_end) -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/506?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: I00821d75342daf3f813b829812d648fe298bea81 Gerrit-Change-Number: 506 Gerrit-PatchSet: 4 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: syzzer Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Comment-Date: Fri, 12 Apr 2024 20:01:02 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment --7PonoMt/cVc= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: plaisthos.

Patch set 4:Code-Review -1=

Vi= ew Change

5 comments:

  • Patchset:

    • Patch Set #4:

      I have always supported to place the tag at t= he end. It's easier to manage in hardware, is common practice and has n= o security impact.

      The only real reservation I have is whether this should be combined w= ith other protocol changes to prevent an explosion of possible wire formats= . For example with a longer on-the-wire IV. Combining these would results i= n 2 possible AEAD wire formats, instead of 4. (Or 8, if there are plans for= a longer peer-id, but not sure if that was just a typo in v1 or actually p= lanned).

      (And= then there are a few nits, see comments.)

  • File src/openvpn/crypto.c:

    • Patch Set #1, Line 426: uint8_t *tag_ptr =3D NULL;<= /p>

      Not sure if t= he current static analyzers are smart enough to detect that these (non-cons= t) variables are not used inside the error_exit label, but they used to com= plain about jumping over an initialization. (What CRYPTO_ERROR above does.)=

    • Patch Set #1, Line 463: ASSERT(buf_inc_len(&work, outlen));

      Good to add a newl= ine to visually separate the decryption from the authentication, but the bu= f_inc_len belongs to the decryption bit, right? Not the authentication bit.=

  • File src/openvpn= /ssl.h:

    • Patch Set #= 1, Line 111: #define IV= _PROTO_DATA_V3 (1<<10)

      This means that this commit can only go in to= gether with commits for a larger peer id and larger IV, right?

    • File tests/unit_tests/openvpn= /test_ssl.c:

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

    Gerrit-Project: openvpn
    Gerrit-Branch: master
    Gerrit-Change-Id: I00821d75342daf3f813b829812d= 648fe298bea81
    Gerrit-Change-Number: 506
    Gerrit-PatchSet: 4
    Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
    Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
    Gerrit-Reviewer: syzzer <steffan@...1856...= >
    Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
    Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
    Gerrit-Comment-Date: Fri, 12 Apr 2024 20:01:02= +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment
    --7PonoMt/cVc=--