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]
Date:	Mon, 04 Aug 2014 19:58:41 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	sasha.levin@...cle.com
Cc:	tgraf@...g.ch, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, kaber@...sh.net,
	paulmck@...ux.vnet.ibm.com, josh@...htriplett.org,
	challa@...ronetworks.com, walpole@...pdx.edu, dev@...nvswitch.org,
	netfilter-devel@...r.kernel.org, nikolay@...hat.com
Subject: Re: [PATCH net-next 2/3] netlink: Convert netlink_lookup() to use
 RCU protected hash table

From: Sasha Levin <sasha.levin@...cle.com>
Date: Mon, 04 Aug 2014 22:10:19 -0400

> On 08/02/2014 05:47 AM, Thomas Graf wrote:
>>  static void *netlink_seq_start(struct seq_file *seq, loff_t *pos)
>> -	__acquires(nl_table_lock)
>>  {
>> -	read_lock(&nl_table_lock);
>> +	rcu_read_lock();
>>  	return *pos ? netlink_seq_socket_idx(seq, *pos - 1) : SEQ_START_TOKEN;
>>  }
> 
> I'm not sure how you expect this code to work. You're replacing a local lock
> with a RCU critical section. Imagine you're doing spin_lock() and just going
> back to userspace.
> 
> It's quite easy to trigger this issue:

I think he expected the end of the seq sequence to drop the RCU lock,
via netlink_seq_stop().
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ