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>] [day] [month] [year] [list]
Message-ID: <CADvbK_fB0NqDuo_ObELfqDGrTxZShVXxyg6FLfeHq1NoKE7zTA@mail.gmail.com>
Date:   Mon, 1 May 2023 16:18:00 -0400
From:   Xin Long <lucien.xin@...il.com>
To:     Tung Quang Nguyen <tung.q.nguyen@...tech.com.au>
Cc:     network dev <netdev@...r.kernel.org>,
        "tipc-discussion@...ts.sourceforge.net" 
        <tipc-discussion@...ts.sourceforge.net>,
        "kuba@...nel.org" <kuba@...nel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>,
        "davem@...emloft.net" <davem@...emloft.net>
Subject: Re: [tipc-discussion] [PATCH net 1/2] tipc: add tipc_bearer_min_mtu
 to calculate min mtu

On Mon, May 1, 2023 at 11:35 AM Xin Long <lucien.xin@...il.com> wrote:
> On Mon, May 1, 2023 at 1:21 AM Tung Quang Nguyen <tung.q.nguyen@...tech.com.au> wrote:
>> >@@ -760,6 +760,7 @@ static int tipc_udp_enable(struct net *net, struct tipc_bearer *b,
>> >               else
>> >                       udp_conf.local_ip6 = local.ipv6;
>> >               ub->ifindex = dev->ifindex;
>> >+              b->encap_hlen = sizeof(struct ipv6hdr) + sizeof(struct udphdr);
>> tipc_mtu_bad() needs to be called here to check for the minimum required MTU like the way ipv4 UDP bearer does.
>
> Agree, especially after commit 5a6f6f579178 ("tipc: set ub->ifindex for local ipv6 address"), we have the dev there.
After taking a second look, I think we should delete the tipc_mtu_bad()
call for ipv4 UDP bearer, as b->mtu is no longer using dev->mtu since:

  commit a4dfa72d0acd ("tipc: set default MTU for UDP media")

The issue described in commit 3de81b758853 ("tipc: check minimum bearer MTU")
no longer exists in UDP bearer.

Besides, dev->mtu can still be changed to a too small mtu after the UDP
bearer is created even with the tipc_mtu_bad() check in tipc_udp_enable().
Note that NETDEV_CHANGEMTU event processing in tipc_l2_device_event()
doesn't really work for UDP bearer.

I will leave this patch as it is in my v2 post, and create another patch
for net-next to delete the unnecessary tipc_mtu_bad() check in UDP bearer.

Agree?

Thanks.

Powered by blists - more mailing lists