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: <20200708.152516.848610490321452051.davem@davemloft.net>
Date:   Wed, 08 Jul 2020 15:25:16 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     lucien.xin@...il.com
Cc:     netdev@...r.kernel.org, jchapman@...alix.com, gnault@...hat.com
Subject: Re: [PATCH net] l2tp: remove skb_dst_set() from l2tp_xmit_skb()

From: Xin Long <lucien.xin@...il.com>
Date: Tue,  7 Jul 2020 02:02:32 +0800

> In the tx path of l2tp, l2tp_xmit_skb() calls skb_dst_set() to set
> skb's dst. However, it will eventually call inet6_csk_xmit() or
> ip_queue_xmit() where skb's dst will be overwritten by:
> 
>    skb_dst_set_noref(skb, dst);
> 
> without releasing the old dst in skb. Then it causes dst/dev refcnt leak:
> 
>   unregister_netdevice: waiting for eth0 to become free. Usage count = 1
> 
> This can be reproduced by simply running:
> 
>   # modprobe l2tp_eth && modprobe l2tp_ip
>   # sh ./tools/testing/selftests/net/l2tp.sh
> 
> So before going to inet6_csk_xmit() or ip_queue_xmit(), skb's dst
> should be dropped. This patch is to fix it by removing skb_dst_set()
> from l2tp_xmit_skb() and moving skb_dst_drop() into l2tp_xmit_core().
> 
> Fixes: 3557baabf280 ("[L2TP]: PPP over L2TP driver core")
> Reported-by: Hangbin Liu <liuhangbin@...il.com>
> Signed-off-by: Xin Long <lucien.xin@...il.com>

Applied and queued up for -stable, thank you.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ