lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201106084634.GA3556@localhost.localdomain>
Date:   Fri, 6 Nov 2020 05:46:34 -0300
From:   Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
To:     Petr Malat <oss@...at.biz>
Cc:     linux-sctp@...r.kernel.org, Vlad Yasevich <vyasevich@...il.com>,
        Neil Horman <nhorman@...driver.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sctp: Fix sending when PMTU is less than
 SCTP_DEFAULT_MINSEGMENT

On Thu, Nov 05, 2020 at 11:39:47AM +0100, Petr Malat wrote:
> Function sctp_dst_mtu() never returns lower MTU than
> SCTP_TRUNC4(SCTP_DEFAULT_MINSEGMENT) even when the actual MTU is less,
> in which case we rely on the IP fragmentation and must enable it.

This should be being handled at sctp_packet_will_fit():

          psize = packet->size;
          if (packet->transport->asoc)
                  pmtu = packet->transport->asoc->pathmtu;
          else
                  pmtu = packet->transport->pathmtu;

          /* Decide if we need to fragment or resubmit later. */
          if (psize + chunk_len > pmtu) {
                  /* It's OK to fragment at IP level if any one of the following
                   * is true:
                   *      1. The packet is empty (meaning this chunk is greater
                   *         the MTU)
                   *      2. The packet doesn't have any data in it yet and data
                   *         requires authentication.
                   */
                  if (sctp_packet_empty(packet) ||
                      (!packet->has_data && chunk->auth)) {
                          /* We no longer do re-fragmentation.
                           * Just fragment at the IP layer, if we
                           * actually hit this condition
                           */
                          packet->ipfragok = 1;
                          goto out;
                  }

Why the above doesn't handle it already?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ