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: <20191022145316.63bf3b5a@cakuba.netronome.com>
Date:   Tue, 22 Oct 2019 14:53:16 -0700
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Stefano Brivio <sbrivio@...hat.com>
Cc:     David Miller <davem@...emloft.net>,
        Hillf Danton <hdanton@...a.com>,
        Taehee Yoo <ap420073@...il.com>,
        Greg Rose <gvrose8192@...il.com>,
        Eric Dumazet <eric.dumazet@...il.com>,
        Marcelo Ricardo Leitner <marcelo.leitner@...il.com>,
        Ying Xue <ying.xue@...driver.com>,
        Andrey Konovalov <andreyknvl@...gle.com>,
        Pravin B Shelar <pshelar@....org>,
        syzkaller-bugs@...glegroups.com,
        syzbot <syzbot+13210896153522fe1ee5@...kaller.appspotmail.com>,
        Jiri Benc <jbenc@...hat.com>,
        Eelco Chaudron <echaudro@...hat.com>, netdev@...r.kernel.org,
        dev@...nvswitch.org
Subject: Re: [PATCH net] net: openvswitch: free vport unless
 register_netdevice() succeeds

On Mon, 21 Oct 2019 12:01:57 +0200, Stefano Brivio wrote:
> From: Hillf Danton <hdanton@...a.com>
> 
> syzbot found the following crash on:
 
> The function in net core, register_netdevice(), may fail with vport's
> destruction callback either invoked or not. After commit 309b66970ee2,

I've added the correct commit quote here, please heed checkpatch'es
warnings.

> the duty to destroy vport is offloaded from the driver OTOH, which ends
> up in the memory leak reported.
> 
> It is fixed by releasing vport unless device is registered successfully.
> To do that, the callback assignment is defered until device is registered.
> 
> Reported-by: syzbot+13210896153522fe1ee5@...kaller.appspotmail.com
> Fixes: 309b66970ee2 ("net: openvswitch: do not free vport if register_netdevice() is failed.")
> Cc: Taehee Yoo <ap420073@...il.com>
> Cc: Greg Rose <gvrose8192@...il.com>
> Cc: Eric Dumazet <eric.dumazet@...il.com>
> Cc: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
> Cc: Ying Xue <ying.xue@...driver.com>
> Cc: Andrey Konovalov <andreyknvl@...gle.com>
> Signed-off-by: Hillf Danton <hdanton@...a.com>
> Acked-by: Pravin B Shelar <pshelar@....org>
> [sbrivio: this was sent to dev@...nvswitch.org and never made its way
>  to netdev -- resending original patch]
> Signed-off-by: Stefano Brivio <sbrivio@...hat.com>
> ---
> This patch was sent to dev@...nvswitch.org and appeared on netdev
> only as Pravin replied to it, giving his Acked-by. I contacted the
> original author one month ago requesting to resend this to netdev,
> but didn't get an answer, so I'm now resending the original patch.

Applied and queued for 4.14+, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ