bugmake - Bugs: bug #43921, make does not check error result...

 
 

bug #43921: make does not check error result of ttyname()

Submitter:  Frank Heckenbach <frank>
Submitted:  Sat 03 Jan 2015 08:39:03 AM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Duplicate Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  4.1 Operating System:  POSIX-Based
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 12 Jul 2015 09:03:08 PM UTC, comment #1: 

This was fixed previously for bug #43434

Paul D. Smith <psmith>
Group administrator
Sat 03 Jan 2015 08:39:03 AM UTC, original submission:  

make uses isatty() on stdout/stderr and if successful, calls define_variable_cname() with the result of ttyname() without checking whether it's NULL.

Of course, normally this won't happen after isatty() returns 1, but it may in special circumstances, e.g. under GNU/Linux if it's a pty, but /dev/pts is not readable. That's one way to reproduce it:

% sudo chmod 0 /dev/pts
% make
Segmentation fault
% sudo chmod 755 /dev/pts

(What I'd actually done when I saw it was to run make in a chroot where I had bind-mounted /dev, but forgotten about /dev/pts -- should have used --rbind.)

So you might say it's a case of don't-do-that, and it's not really important to me, just wanted to let you know ...

Frank Heckenbach <frank>

 

(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 psmith (Posted a comment)
  • -email is unavailable- added by frank (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
    2015-07-12 psmith StatusNone Duplicate
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code