Re: Bogus F_SETFL usage with FD_CLOEXEC

2012-12-18 Thread Guillem Jover
On Mon, 2012-12-17 at 13:05:28 +0100, Guillem Jover wrote:
 On Sun, 2012-12-16 at 22:51:11 +, Steven Chamberlain wrote:
  Using Debian Code Search we can see other cases where possibly the same
  mistake has been made - I wonder if any of these would cause bugs:
  
  http://codesearch.debian.net/search?q=fcntl.*F_SETFL.*FD_

This might still miss flags set through a variable.

 I think we should report all these, there does not seem to be many in
 any case:

   9base (#696247)
   cctools (#696249)
   chromium-browser (webkit, #696299)
   e17 (#696276)
   fish (false positive)
   freeradius (#696250)
   gst-plugins-bad0.10 (#696278)
   jruby (#696283)
   libowfat (#696251)
   mswatch (#696252)
   ocamlnet (#696279)
   qt4-x11 (webkit, #696297)
   qtwebkit (webkit, #696296)
   ruby1.8 (#696280)
   ruby1.9.1 (#696281)
   webkit (#696295)

And can be tracked with:

  
http://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=fcntl-fd-cloexec;users=debian-bsd@lists.debian.org

 Providing patches for those should also be trivial. I'll start doing
 so if no one else offers for the task. :)

So, just went ahead and did it.

Thanks,
Guillem


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20121219021702.ga2...@gaara.hadrons.org



Bogus F_SETFL usage with FD_CLOEXEC (was Re: Bug#679198: ...)

2012-12-17 Thread Guillem Jover
On Sun, 2012-12-16 at 22:51:11 +, Steven Chamberlain wrote:
 Using Debian Code Search we can see other cases where possibly the same
 mistake has been made - I wonder if any of these would cause bugs:
 
 http://codesearch.debian.net/search?q=fcntl.*F_SETFL.*FD_

Ah, nice thinking. All these are bugs, because currently on all (?)
GNU/* systems (including GNU/Linux) FD_CLOEXEC is defined as 1 which
maps to O_WRONLY for F_SETFL. So at best they are just leaking file
descriptors, and at worst they might fail if they try to set the flag
on a non-writable descriptor.

I think we should report all these, there does not seem to be many in
any case:

  9base
  cctools
  chromium-browser (webkit)
  e17
  fish
  freeradius
  gst-plugins-bad0.10
  jruby
  libowfat
  mswatch
  ocamlnet
  qt4-x11 (webkit)
  qtwebkit (webkit)
  ruby1.8
  ruby1.9.1
  webkit

Providing patches for those should also be trivial. I'll start doing
so if no one else offers for the task. :)

Thanks,
Guillem


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20121217120528.ga26...@gaara.hadrons.org