bugGNU Screen - Bugs: bug #52259, Do not close all inherited fds

 
 

bug #52259: Do not close all inherited fds

Submitted by:  Ilya Basin <basinilya>
Submitted on:  Sat 21 Oct 2017 06:27:16 AM UTC  
 
Category: Feature RequestSeverity: 3 - Normal
Priority: 5 - NormalStatus: Wont Fix
Privacy: PublicAssigned to: None
Open/Closed: ClosedRelease: 4.6.1
Fixed Release: NonePlanned Release: None
Work Required: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 23 Oct 2017 11:31:46 AM UTC, comment #1:

Hey, yes it's by design, screen shouldn't inherit and leak any unnecessary file descriptors from screen to applications running inside screen, especially considering that on some installations it's run suid.
If you have local requirements to do otherwise, you can of course patch it for local use, but be aware of security considerations etc.

Amadeusz Sławiński <amade>
Project Administrator
Sat 21 Oct 2017 06:27:16 AM UTC, original submission:

In screen.c there's the comment:

/*
* First, close all unused descriptors
* (otherwise, we might have problems with the select() call)
*/
closeallfiles(0);

This closes everything except 0,1, and 2. Will it hurt if we let fds 3..63 survive? I need to pass an anonymous pipe for synchronization between the caller of screen and the commands launched inside screen.

Ilya Basin <basinilya>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by amade (Posted a comment)
  • -unavailable- added by basinilya (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 23 Oct 2017 11:31:46 AM UTCamadeStatusNone=>Wont Fix
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1