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  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]
Date:   Tue, 30 Apr 2019 16:33:28 -0700
From:   Cong Wang <>
To:     YueHaibing <>
Cc:     Jason Wang <>,
        "weiyongjun (A)" <>,
        David Miller <>,
        Eric Dumazet <>,
        Jesper Dangaard Brouer <>,
        "Michael S. Tsirkin" <>,
        "Li,Rongqing" <>,
        nicolas dichtel <>,
        Chas Williams <>,,
        LKML <>,
        Linux Kernel Network Developers <>,
        Peter Xu <>
Subject: Re: [PATCH] tun: Fix use-after-free in tun_net_xmit

On Mon, Apr 29, 2019 at 7:44 PM YueHaibing <> wrote:
> With SOCK_RCU_FREE tfile is ok ,
> but tfile->sk is freed by sock_put in __tun_detach, it will trgger

SOCK_RCU_FREE is exactly for sock and for sock_put(),
you need to look into sock_put() path to see where SOCK_RCU_FREE
is tested.

> use-after-free in tun_net_xmit if tun->numqueues check passed.

Why do you believe we still have use-after-free with SOCK_RCU_FREE?

tun_net_xmit() holds RCU read lock, so with SOCK_RCU_FREE,
the sock won't be freed until tun_net_xmit() releases RCU read lock.
This is just how RCU works...

Powered by blists - more mailing lists