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] [day] [month] [year] [list]
Message-ID: <ygnhiltzpz6n.fsf@nvidia.com>
Date:   Mon, 31 Jan 2022 19:55:44 +0200
From:   Vlad Buslov <vladbu@...dia.com>
To:     Antoine Tenart <atenart@...nel.org>
CC:     <davem@...emloft.net>, <kuba@...nel.org>, <echaudro@...hat.com>,
        <sbrivio@...hat.com>, <netdev@...r.kernel.org>, <pshelar@....org>
Subject: Re: [PATCH net 1/2] vxlan: do not modify the shared tunnel info
 when PMTU triggers an ICMP reply

On Mon 31 Jan 2022 at 15:26, Antoine Tenart <atenart@...nel.org> wrote:
> Quoting Vlad Buslov (2022-01-31 12:26:47)
>> On Fri 28 Jan 2022 at 19:01, Antoine Tenart <atenart@...nel.org> wrote:
>> >
>> > I finally had some time to look at this. Does the diff below fix your
>> > issue?
>> 
>> Yes, with the patch applied I'm no longer able to reproduce memory leak.
>> Thanks for fixing this!
>
> Thanks for testing. I'll send a formal patch, can I add your Tested-by?

Sure!

Reported-by: Vlad Buslov <vladbu@...dia.com>
Tested-by: Vlad Buslov <vladbu@...dia.com>

>
> Also, do you know how to trigger the following code path in OVS
> https://elixir.bootlin.com/linux/latest/source/net/openvswitch/actions.c#L944
> ? Would be good (not required) to test it, to ensure the fix doesn't
> break it.

Sorry, I don't. We mostly concentrate on testing hardware
offload-specific code paths (e.g. TC).

>
> Thanks,
> Antoine
>
>> > diff --git a/include/net/dst_metadata.h b/include/net/dst_metadata.h
>> > index 14efa0ded75d..90a7a4daea9c 100644
>> > --- a/include/net/dst_metadata.h
>> > +++ b/include/net/dst_metadata.h
>> > @@ -110,8 +110,8 @@ static inline struct metadata_dst *tun_rx_dst(int md_size)
>> >  static inline struct metadata_dst *tun_dst_unclone(struct sk_buff *skb)
>> >  {
>> >         struct metadata_dst *md_dst = skb_metadata_dst(skb);
>> > -       int md_size;
>> >         struct metadata_dst *new_md;
>> > +       int md_size, ret;
>> >  
>> >         if (!md_dst || md_dst->type != METADATA_IP_TUNNEL)
>> >                 return ERR_PTR(-EINVAL);
>> > @@ -123,8 +123,15 @@ static inline struct metadata_dst *tun_dst_unclone(struct sk_buff *skb)
>> >  
>> >         memcpy(&new_md->u.tun_info, &md_dst->u.tun_info,
>> >                sizeof(struct ip_tunnel_info) + md_size);
>> > +#ifdef CONFIG_DST_CACHE
>> > +       ret = dst_cache_init(&new_md->u.tun_info.dst_cache, GFP_ATOMIC);
>> > +       if (ret) {
>> > +               metadata_dst_free(new_md);
>> > +               return ERR_PTR(ret);
>> > +       }
>> > +#endif
>> > +
>> >         skb_dst_drop(skb);
>> > -       dst_hold(&new_md->dst);
>> >         skb_dst_set(skb, &new_md->dst);
>> >         return new_md;
>> >  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ