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: <20140806195127.GA26832@casper.infradead.org>
Date:	Wed, 6 Aug 2014 20:51:27 +0100
From:	Thomas Graf <tgraf@...g.ch>
To:	Cong Wang <cwang@...pensource.com>
Cc:	Andrey Wagin <avagin@...il.com>, netdev <netdev@...r.kernel.org>
Subject: Re: linux-next: net/netlink/diag.c:106 suspicious
 rcu_dereference_protected() usage!

On 08/06/14 at 10:52am, Cong Wang wrote:
> On Wed, Aug 6, 2014 at 10:29 AM, Andrey Wagin <avagin@...il.com> wrote:
> > [   40.072199] ===============================
> > [   40.072350] [ INFO: suspicious RCU usage. ]
> > [   40.072501] 3.16.0-next-20140806 #1 Not tainted
> > [   40.072659] -------------------------------
> > [   40.072807] net/netlink/diag.c:106 suspicious
> > rcu_dereference_protected() usage!
> > [   40.073047]
> > other info that might help us debug this:
> >
> > [   40.073276]
> > rcu_scheduler_active = 1, debug_locks = 0
> > [   40.073494] 4 locks held by criu/2838:
> > [   40.073635]  #0:  (sock_diag_mutex){+.+.+.}, at:
> > [<ffffffff81689afb>] sock_diag_rcv+0x1b/0x40
> > [   40.074226]  #1:  (sock_diag_table_mutex){+.+.+.}, at:
> > [<ffffffff81689c6d>] sock_diag_rcv_msg+0x6d/0x140
> > [   40.074803]  #2:  (nlk->cb_mutex){+.+.+.}, at: [<ffffffff816a28f1>]
> > netlink_dump+0x21/0x2d0
> > [   40.075382]  #3:  (nl_table_lock){.+.?..}, at: [<ffffffffa0286601>]
> > netlink_diag_dump+0x31/0xb0 [netlink_diag]
> > [   40.076351]
> 
> 
> Looks like we should hold rcu_read_lock() before calling __netlink_diag_dump().

netlink_diag_dump() still acquires nl_table_lock which is pointless as
a separate mutex has been introduced to protect mutations. I will send
a patch to RCU'ify it properly.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ