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:	Tue, 5 Jan 2016 18:10:15 +0800
From:	Xin Long <lucien.xin@...il.com>
To:	Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
Cc:	Eric Dumazet <eric.dumazet@...il.com>,
	network dev <netdev@...r.kernel.org>,
	linux-sctp@...r.kernel.org,
	Marcelo Ricardo Leitner <mleitner@...hat.com>,
	Vlad Yasevich <vyasevic@...hat.com>, daniel@...earbox.net,
	davem <davem@...emloft.net>,
	Herbert Xu <herbert@...dor.apana.org.au>
Subject: Re: [PATCH net-next 1/5] sctp: add the rhashtable apis for sctp
 global transport hashtable

On Thu, Dec 31, 2015 at 1:41 AM, Marcelo Ricardo Leitner
<marcelo.leitner@...il.com> wrote:
> On Wed, Dec 30, 2015 at 11:50:46PM +0800, Xin Long wrote:
> ...
>> +void sctp_hash_transport(struct sctp_transport *t)
>> +{
>> +     struct sctp_sockaddr_entry *addr;
>> +     struct sctp_hash_cmp_arg arg;
>> +
>> +     addr = list_entry(t->asoc->base.bind_addr.address_list.next,
>> +                       struct sctp_sockaddr_entry, list);
>> +     arg.laddr = &addr->a;
>> +     arg.paddr = &t->ipaddr;
>> +     arg.net   = sock_net(t->asoc->base.sk);
>> +
>> +reinsert:
>> +     if (rhashtable_lookup_insert_key(&sctp_transport_hashtable, &arg,
>> +                                      &t->node, sctp_hash_params) == -EBUSY)
>> +             goto reinsert;
>> +}
>
> This is the nasty situation I mentioned in previous email. It seems that
> a stress test can trigger a double rehash and cause an entry to not be
> added.
>
> This is in fact very near some bugs you caught on rhashtable in the past
> few days/couple of weeks tops.
>
> I'm actually against this loop as is. I may have not been clear with Xin
> about not adding my signature to the patchset due to this.
>
> Please take a look at Xin's emails on thread 'rhashtable: Prevent
> spurious EBUSY errors on insertion' about this particular situation.
> Cc'ing Herbert as he wanted to see the patches for that issue.
>
>   Marcelo
>
without this 'reinsert'.

we can reproduce this issue like this:
1. download the attachment
2. cp sctperf.tar.gz to server and client hosts
3. in each hosts.
#make
4. in server:
#sh saddr.sh $ethx
#./ss
5. in client:
#sh caddr.sh $ethx
#ulimit -n 20000
#./cc

when the number of  connections reach about 1600, this issue will be triggered.

Download attachment "sctperf.tar.gz" of type "application/x-gzip" (1932 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ