From: "MaxF (Code Review)" Date: Sat, 28 Dec 2024 00:37:01 +0000 In-Reply-To: References: Reply-To: max@...2606..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <74d9c84e717a9963cc0788f7a3c2f1841ed5042c-EmailReviewComments-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="X6iIHiirrLI="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: Do not attempt to decrypt packets anymore after 2**36 failed decryptions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: flichtenheld , openvpn-devel --X6iIHiirrLI= 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/+/843?usp=3Demail ) Change subject: Do not attempt to decrypt packets anymore after 2**36 faile= d decryptions ...................................................................... Patch Set 2: Code-Review-1 (5 comments) Patchset: PS2: I'm unsure if we should use the 2^36 limit for Chacha-poly, but for AES-GCM= it should be ok. File src/openvpn/crypto.h: http://gerrit.openvpn.net/c/openvpn/+/843/comment/39d7c228_ac4d76f3 : PS2, Line 667: We Incomplete http://gerrit.openvpn.net/c/openvpn/+/843/comment/e2534d46_534f661c : PS2, Line 672: TLS 1.3 Should be DTLS http://gerrit.openvpn.net/c/openvpn/+/843/comment/96fbdeb5_8ce34e21 : PS2, Line 672: 2**36 I've been looking at the integrity bounds in the AEAD limits RFC again and = I'm not sure if 2^36 is right for us. The number of decryption failures tha= t we can tolerate depends on the maximum message length that we're willing = to receive (L in the formulas). The DTLS RFC assumes L <=3D 2^10, but for us it can be larger. I don't thin= k this matters for AES-GCM, the 2^36 limit leaves lots of room to spare. Bu= t for Chacha-poly, it's pretty tight. If we tolerate p =3D 2^-57 and we have L =3D 2^14, then we can only have 2^= 32 decryption failures. File src/openvpn/crypto.c: http://gerrit.openvpn.net/c/openvpn/+/843/comment/62ea554d_ed6bec9a : PS2, Line 426: Extra whitespace -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/843?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: I81440ac28a1ad553652e201234e5ddfe03a8c190 Gerrit-Change-Number: 843 Gerrit-PatchSet: 2 Gerrit-Owner: plaisthos Gerrit-Reviewer: MaxF Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-Comment-Date: Sat, 28 Dec 2024 00:37:01 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment --X6iIHiirrLI= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, plaisthos.

Patch set 2:Code-Review -1=

Vi= ew Change

5 comments:

  • Patchset:

    • Patch Set #2:

      I'm unsure if we should use the 2^36 limi= t for Chacha-poly, but for AES-GCM it should be ok.

  • File src/openvpn/crypto.h:

    • Patch Set #2, Line 667: We

      Incomplete

    • Pa= tch Set #2, Line 672: T= LS 1.3

      Should be DTLS

    • Patch Set #2, Line 672: 2**36

      I've been looking at the integrity bo= unds in the AEAD limits RFC again and I'm not sure if 2^36 is right for= us. The number of decryption failures that we can tolerate depends on the = maximum message length that we're willing to receive (L in the formulas= ).

      The DTLS R= FC assumes L <=3D 2^10, but for us it can be larger. I don't think t= his matters for AES-GCM, the 2^36 limit leaves lots of room to spare. But f= or Chacha-poly, it's pretty tight.

      If we tolerate p =3D 2^-57 and we have L =3D 2^14= , then we can only have 2^32 decryption failures.

  • File src/openvpn/crypto.c:

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

    Gerrit-Project: openvpn
    Gerrit-Branch: master
    Gerrit-Change-Id: I81440ac28a1ad553652e201234e= 5ddfe03a8c190
    Gerrit-Change-Number: 843
    Gerrit-PatchSet: 2
    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: Sat, 28 Dec 2024 00:37:01= +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment
    --X6iIHiirrLI=--