X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:from:date:message-id:subject:to
	:content-type; q=dns; s=default; b=a9pmv5r0VUhKTNeDoQoO8kaqeOoCo
	FS19ZRThyr99sAiZEQdt4hPYTQ2hBbxjUzwplgiRweHbFguaqmygb4PF37jadx1J
	b+G0S73EPDdOdzG5LgrBePcLQ87SrjB9CfQMC4dWfBSFrZ5AeZOXayoADxLN67iD
	srmh9rhwXRVdZg=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:from:date:message-id:subject:to
	:content-type; s=default; bh=QoV2y3OCwwC+d8/Njqm1q42Y04E=; b=l8l
	wOqnyPvweATypNCTvm4tCZtfXRoiJPdn03Nly3Mnt8lUixYEwAZk0OMmzzaLrWGb
	oHB9vb0gFkJQqdKL2GvwLKfHN7aoM/3/EfPdUWUITdhWJnM5LqFq5NCM2qAvY9EF
	SHYVKJ6bjowNUeNT2tmF97cSosSnGdgnTJbBw1Bg=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-6.8 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=downloaded, cygwin64
X-HELO: mail-it0-f53.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=1e100.net; s=20161025;        h=x-gm-message-state:mime-version:from:date:message-id:subject:to;        bh=WR96w1sp73IWyxilm/p8TMLmnFH8/plmX8kS86n1bGM=;        b=IN05S5nANwEIan4HvuuGbeiHR57rL0E5ytXn7N0b3IsQrNzXK/SO2BrW6ajhwhqxIT         O3q6yEr6AgjJWH5iHWj7+hq1wDWhcJYvhX7TjkeQk05JIu4zmd25CoCxmFiakKFmW05v         cqAPY5C6UkNhBBB5LFCszf+Y83jf44+j+SmM6qKzZecd3WOQIpgKH5WJnV+rQNFV+NdR         QxygGm0rYrObzSU5GhqLYdkiAQrIxybfc3cuxOtq5U687IplifcfX3ayx68j+DisSS+H         0IgJKx6XmK4yS4DOJkW2Eq42BHVSBY8trK9HGyHoilJKvnpQmyVm0Pu+nBBQpmQTDz1h         o7cg==
X-Gm-Message-State: AN3rC/6ZInq0Eenl7YFlYbrh63krNolWoOVyYn11zsvNcwWotIJW9B1I	0ByGGuPmxRw+rLdne78pVv6BNzjyhvRklMU=
X-Received: by 10.36.50.12 with SMTP id j12mr17800605ita.75.1493557963361; Sun, 30 Apr 2017 06:12:43 -0700 (PDT)
MIME-Version: 1.0
From: Kinichiro Inoguchi <kinichiro.inoguchi@gmail.com>
Date: Sun, 30 Apr 2017 22:12:42 +0900
Message-ID: <CAB2YY7FGEcAyVmCBJZwJ+mm4DzrWxyQbR-a8rw7YdYnR2aRxTg@mail.gmail.com>
Subject: Safeness of arc4random while fork
To: cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8
X-IsSubscribed: yes

Hello,

I saw this issue while building LibreSSL on Cygwin64.

I had downloaded LibreSSL tar ball from here.
https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.5.3.tar.gz
And I tried to build it, build was ok, but 1 regression test failed.

This test is testing the safeness of arc4random() while forking.
With other platforms, linux, *bsd, OSX, MinGW64, this test never fail.

I checked FAQ and ML archives, but couldn't find anything.
Has anyone experienced this already ?
Could someone check the implementation of arc4random functions, please ?

build log:
----------------------------------------------------------------------
$ uname -a
CYGWIN_NT-6.1 testpc001 2.8.0(0.309/5/3) 2017-04-01 20:47 x86_64 Cygwin

$ ./configure
...
checking for poll... yes
checking for socketpair... yes
checking for arc4random... yes
checking for arc4random_buf... yes
checking for arc4random_uniform... yes
checking for explicit_bzero... no
checking for getauxval... no
...

$ make check
...
PASS: aes_wrap.exe
FAIL: arc4randomforktest.sh
PASS: asn1test.exe
...
----------------------------------------------------------------------

I posted this issue to LibreSSL project, too.
https://github.com/libressl-portable/portable/issues/289

Best regards,

Kinichiro Inoguchi

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

