Debian Bug report logs - #646016
perl: undefined behaviour in ext/POSIX/t/sysconf.t wrt FIFOs

version graph

Package: perl; Maintainer for perl is Niko Tyni <ntyni@debian.org>; Source for perl is src:perl.

Reported by: Pino Toscano <pino@debian.org>

Date: Thu, 20 Oct 2011 15:42:02 UTC

Severity: normal

Tags: fixed-upstream, patch

Found in version perl/5.14.2-1

Fixed in version perl/5.14.2-2

Done: Dominic Hargreaves <dom@earth.li>

Bug is archived. No further changes may be made.

Forwarded to https://rt.perl.org/rt3/Public/Bug/Display.html?id=102888

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Niko Tyni <ntyni@debian.org>:
Bug#646016; Package perl. (Thu, 20 Oct 2011 15:42:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pino Toscano <pino@debian.org>:
New Bug report received and forwarded. Copy sent to Niko Tyni <ntyni@debian.org>. (Thu, 20 Oct 2011 15:42:06 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Pino Toscano <pino@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: perl: undefined behaviour in ext/POSIX/t/sysconf.t wrt FIFOs
Date: Thu, 20 Oct 2011 17:38:51 +0200
[Message part 1 (text/plain, inline)]
Package: perl
Version: 5.14.2-1
Severity: normal
Tags: patch

Hi,

while compiling perl 5.14.2 on GNU/Hurd, I ran into what it seems a
undefined POSIX behaviour in ext/POSIX/t/sysconf.t.

      my $fd = POSIX::open($fifo, O_RDWR)
	  or skip("could not open $fifo ($!)", 3 * @path_consts_fifo);

according to the POSIX open()[1] about O_RDWR,
  The result is undefined if this flag is applied to a FIFO.
.... which is actually our case.
Apparently Linux and *FreeBSD (and maybe also OSes) accept this
behaviour, but on GNU/Hurd this causes the open() call to block
undefinitely. Given there's nothing done with the FIFO if not querying
{,f}pathconf() values, the proposed solution I attached is to change
the opening mode to "O_RDONLY | O_NONBLOCK".

[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html

Thanks,
-- 
Pino
[sysconf.t-posix.diff (text/x-diff, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Niko Tyni <ntyni@debian.org>:
Bug#646016; Package perl. (Tue, 01 Nov 2011 17:51:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dominic Hargreaves <dom@earth.li>:
Extra info received and forwarded to list. Copy sent to Niko Tyni <ntyni@debian.org>. (Tue, 01 Nov 2011 17:51:09 GMT) Full text and rfc822 format available.

Message #10 received at 646016@bugs.debian.org (full text, mbox):

From: Dominic Hargreaves <dom@earth.li>
To: Pino Toscano <pino@debian.org>, 646016@bugs.debian.org
Subject: Re: Bug#646016: perl: undefined behaviour in ext/POSIX/t/sysconf.t wrt FIFOs
Date: Tue, 1 Nov 2011 17:50:45 +0000
On Thu, Oct 20, 2011 at 05:38:51PM +0200, Pino Toscano wrote:
> while compiling perl 5.14.2 on GNU/Hurd, I ran into what it seems a
> undefined POSIX behaviour in ext/POSIX/t/sysconf.t.
> 
>       my $fd = POSIX::open($fifo, O_RDWR)
> 	  or skip("could not open $fifo ($!)", 3 * @path_consts_fifo);
> 
> according to the POSIX open()[1] about O_RDWR,
>   The result is undefined if this flag is applied to a FIFO.
> .... which is actually our case.
> Apparently Linux and *FreeBSD (and maybe also OSes) accept this
> behaviour, but on GNU/Hurd this causes the open() call to block
> undefinitely. Given there's nothing done with the FIFO if not querying
> {,f}pathconf() values, the proposed solution I attached is to change
> the opening mode to "O_RDONLY | O_NONBLOCK".

Thanks for the patch. I'm testing this on bleadperl now and will
forward upstream prior to applying locally, using your message above
in the commit log.

-- 
Dominic Hargreaves | http://www.larted.org.uk/~dom/
PGP key 5178E2A5 from the.earth.li (keyserver,web,email)




Set Bug forwarded-to-address to 'https://rt.perl.org/rt3/Public/Bug/Display.html?id=102888'. Request was from Dominic Hargreaves <dom@earth.li> to control@bugs.debian.org. (Thu, 03 Nov 2011 22:15:03 GMT) Full text and rfc822 format available.

Added tag(s) pending. Request was from Dominic Hargreaves <dom@earth.li> to control@bugs.debian.org. (Sun, 06 Nov 2011 11:39:43 GMT) Full text and rfc822 format available.

Added tag(s) fixed-upstream. Request was from bts-link-upstream@lists.alioth.debian.org to control@bugs.debian.org. (Thu, 10 Nov 2011 21:25:20 GMT) Full text and rfc822 format available.

Reply sent to Dominic Hargreaves <dom@earth.li>:
You have taken responsibility. (Sat, 12 Nov 2011 19:36:25 GMT) Full text and rfc822 format available.

Notification sent to Pino Toscano <pino@debian.org>:
Bug acknowledged by developer. (Sat, 12 Nov 2011 19:36:25 GMT) Full text and rfc822 format available.

Message #21 received at 646016-close@bugs.debian.org (full text, mbox):

From: Dominic Hargreaves <dom@earth.li>
To: 646016-close@bugs.debian.org
Subject: Bug#646016: fixed in perl 5.14.2-2
Date: Sat, 12 Nov 2011 19:33:57 +0000
Source: perl
Source-Version: 5.14.2-2

We believe that the bug you reported is fixed in the latest version of
perl, which is due to be installed in the Debian FTP archive:

libcgi-fast-perl_5.14.2-2_all.deb
  to main/p/perl/libcgi-fast-perl_5.14.2-2_all.deb
libperl-dev_5.14.2-2_i386.deb
  to main/p/perl/libperl-dev_5.14.2-2_i386.deb
libperl5.14_5.14.2-2_i386.deb
  to main/p/perl/libperl5.14_5.14.2-2_i386.deb
perl-base_5.14.2-2_i386.deb
  to main/p/perl/perl-base_5.14.2-2_i386.deb
perl-debug_5.14.2-2_i386.deb
  to main/p/perl/perl-debug_5.14.2-2_i386.deb
perl-doc_5.14.2-2_all.deb
  to main/p/perl/perl-doc_5.14.2-2_all.deb
perl-modules_5.14.2-2_all.deb
  to main/p/perl/perl-modules_5.14.2-2_all.deb
perl_5.14.2-2.debian.tar.gz
  to main/p/perl/perl_5.14.2-2.debian.tar.gz
perl_5.14.2-2.dsc
  to main/p/perl/perl_5.14.2-2.dsc
perl_5.14.2-2_i386.deb
  to main/p/perl/perl_5.14.2-2_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 646016@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Dominic Hargreaves <dom@earth.li> (supplier of updated perl package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sat, 12 Nov 2011 17:25:33 +0000
Source: perl
Binary: perl-base libcgi-fast-perl perl-doc perl-modules perl-debug libperl5.14 libperl-dev perl
Architecture: source all i386
Version: 5.14.2-2
Distribution: experimental
Urgency: low
Maintainer: Niko Tyni <ntyni@debian.org>
Changed-By: Dominic Hargreaves <dom@earth.li>
Description: 
 libcgi-fast-perl - CGI::Fast Perl module
 libperl-dev - Perl library: development files
 libperl5.14 - shared Perl library
 perl       - Larry Wall's Practical Extraction and Report Language
 perl-base  - minimal Perl system
 perl-debug - debug-enabled Perl interpreter
 perl-doc   - Perl documentation
 perl-modules - Core Perl modules
Closes: 644108 645790 645989 646016
Changes: 
 perl (5.14.2-2) experimental; urgency=low
 .
   * [SECURITY] CVE-2011-3597: Fix unsafe use of eval in Digest->new();
     thanks to Ansgar Burchardt for the notification (Closes: #644108)
   * Merge 5.12.4-6 from unstable
   * Fix NDBM_File hints on GNU/Hurd
     (thanks, Pino Toscano) (Closes: #645989)
   * Fix hang in t/ext/POSIX/t/sysconf.t on GNU/Hurd
     (thanks, Pino Toscano) (Closes: #646016)
   * Enable LFS on GNU/Hurd
     (thanks, Pino Toscano) (Closes: #645790)
Checksums-Sha1: 
 df2c57a8a546e9adf9ef7128afc05bcd547fc7ef 1680 perl_5.14.2-2.dsc
 dd382372ff2d7ecc2370115860619a4d61146f23 122789 perl_5.14.2-2.debian.tar.gz
 0f0b0a3dff20a7042d2fd426dc2662ef1cb4948c 71902 libcgi-fast-perl_5.14.2-2_all.deb
 d15a4d3c37c091c54eb7763cd3dcacd259c5567b 8159792 perl-doc_5.14.2-2_all.deb
 38400bdcca6947b881bbfd19d0680d64ab1acbe6 3437878 perl-modules_5.14.2-2_all.deb
 f2cf32d20cbedacd559875351ecf69ddb446f1c8 1481686 perl-base_5.14.2-2_i386.deb
 b1ee375dd17e451f6481dd49e69383fee106f712 7757652 perl-debug_5.14.2-2_i386.deb
 728357d3a2e8cb1bd81d7c101994611b1f940894 724410 libperl5.14_5.14.2-2_i386.deb
 05fc561d8b5f746cbb1b5718e0c41a891036e289 2679298 libperl-dev_5.14.2-2_i386.deb
 afde2cd00f7b8d745e50e8fd5b73be8cf9794489 3697142 perl_5.14.2-2_i386.deb
Checksums-Sha256: 
 2fe4a452916a13e31e890498f861f16dc2cb985c270b8acb241c71dc95a59235 1680 perl_5.14.2-2.dsc
 54df71a18cdbe4f596948c215fce9d0931f3598411c9a4b235c8cc0f249288dc 122789 perl_5.14.2-2.debian.tar.gz
 402972d5e953b4dab60eead6f2db893d39ccb9e2fbda9bf1b955c7ee52aa1259 71902 libcgi-fast-perl_5.14.2-2_all.deb
 903edcd2de7ee6f11c2cf044a9e8e5827a5a195caed37d2601f69aca30134c60 8159792 perl-doc_5.14.2-2_all.deb
 56aa2b44c93c5bdd5c162cc2cc21b621083819fa849d829e5aebea85353f0e15 3437878 perl-modules_5.14.2-2_all.deb
 a09fbc8659d69e22b2bf79f8c4bfbee105b4e8954e1b762289ea95e1d971d417 1481686 perl-base_5.14.2-2_i386.deb
 0b15a9136fdfbf74fad53b8d2334549f3f5af5afa1babd95836cef2bc5026d2f 7757652 perl-debug_5.14.2-2_i386.deb
 517f31887e9726b56adf79a702df1fbe7e658043d1838d796ab6320c1841d674 724410 libperl5.14_5.14.2-2_i386.deb
 3f534bc314ef3e6b8f183e436bd99c001503a590a849078c8106c3fc48c1fc7c 2679298 libperl-dev_5.14.2-2_i386.deb
 fc476ebadedb8c403e83aa5225859755c52e9565e835ef477e220bb982ac0aa3 3697142 perl_5.14.2-2_i386.deb
Files: 
 2bc44b5f498292bbc46bbd91cc7a7e5e 1680 perl standard perl_5.14.2-2.dsc
 811c4827f0b7fbc062df6f83deb0fb1a 122789 perl standard perl_5.14.2-2.debian.tar.gz
 aa34142558e90ba36525c084c71f6a4a 71902 perl optional libcgi-fast-perl_5.14.2-2_all.deb
 ab539b6382e90c3ac0efdfb89ab23e15 8159792 doc optional perl-doc_5.14.2-2_all.deb
 aaf6edceeb7e33b0454b9cae9aafa922 3437878 perl standard perl-modules_5.14.2-2_all.deb
 155c17093b59e684b35931c6145c182d 1481686 perl required perl-base_5.14.2-2_i386.deb
 ebf9179d7cb818e6f58b0397c8455820 7757652 debug extra perl-debug_5.14.2-2_i386.deb
 acf28554b68d2184cf0c0c7db880d659 724410 libs optional libperl5.14_5.14.2-2_i386.deb
 c66a3f8cfca5e2d0a5e44e9b3dc64fc7 2679298 libdevel optional libperl-dev_5.14.2-2_i386.deb
 eee5d83199872987abc1250e808f27cb 3697142 perl standard perl_5.14.2-2_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iD8DBQFOvsZCYzuFKFF44qURAjeFAKDYuZEGLOtdLXAYEsIp6txpmUybEgCg+Lfc
8DKci9WMQv7VT3tk11OWZ2A=
=Y/6Y
-----END PGP SIGNATURE-----





Bug No longer marked as fixed in versions perl/5.14.2-2 and reopened. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 12 Nov 2011 20:27:03 GMT) Full text and rfc822 format available.

Bug Marked as fixed in versions perl/5.14.2-2. Request was from Dominic Hargreaves <dom@earth.li> to control@bugs.debian.org. (Sat, 12 Nov 2011 20:27:05 GMT) Full text and rfc822 format available.

Reply sent to Dominic Hargreaves <dom@earth.li>:
You have taken responsibility. (Sun, 13 Nov 2011 17:10:10 GMT) Full text and rfc822 format available.

Notification sent to Pino Toscano <pino@debian.org>:
Bug acknowledged by developer. (Sun, 13 Nov 2011 17:10:10 GMT) Full text and rfc822 format available.

Message #30 received at 646016-done@bugs.debian.org (full text, mbox):

From: Dominic Hargreaves <dom@earth.li>
To: 536844-done@bugs.debian.org, 358518-done@bugs.debian.org, 589730-done@bugs.debian.org, 593764-done@bugs.debian.org, 645989-done@bugs.debian.org, 149848-done@bugs.debian.org, 275357-done@bugs.debian.org, 373698-done@bugs.debian.org, 376329-done@bugs.debian.org, 411786-done@bugs.debian.org, 513047-done@bugs.debian.org, 574156-done@bugs.debian.org, 580356-done@bugs.debian.org, 582380-done@bugs.debian.org, 600376-done@bugs.debian.org, 616288-done@bugs.debian.org, 645790-done@bugs.debian.org, 646016-done@bugs.debian.org, 126238-done@bugs.debian.org, 469402-done@bugs.debian.org, 581259-done@bugs.debian.org, 611854-done@bugs.debian.org
Subject: Fixed in perl 5.14
Date: Sun, 13 Nov 2011 17:08:29 +0000
I believe that these bugs have all been fixed in perl 5.14, which
has now migrated from experimental to unstable.

Dominic.

-- 
Dominic Hargreaves | http://www.larted.org.uk/~dom/
PGP key 5178E2A5 from the.earth.li (keyserver,web,email)




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 12 Dec 2011 07:34:31 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 04:17:11 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.