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

 
 

bug #52259: Do not close all inherited fds

Submitter:  Ilya Basin <basinilya>
Submitted:  Sat 21 Oct 2017 06:27:16 AM UTC
   
 
Category:  Feature Request Severity:  3 - Normal
Priority:  * 5 - Normal Status:  Wont Fix
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Release:  4.6.1
Fixed Release:  None Planned Release:  None
Work Required:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-10-23 amade StatusNone Wont Fix
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code