bugThe GNU Hurd - Bugs: bug #48919, exec server can attempt null...

 
 

bug #48919: exec server can attempt null pointer dereference

Submitter:  Brent Baccala <baccala>
Submitted:  Sat 27 Aug 2016 05:09:21 AM UTC
   
 
Category:  Hurd Servers Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Reproducibility:  Every Time
Size (loc):  None Planned Release:  None
Effort:  0.00
Wiki-like text discussion box: 


* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 28 Aug 2016 07:18:25 PM UTC, comment #1: 

Mmm, indeed. Normally, exec_setexecdata is called at boot, because
startup calls proc_setexecdata, which in turn calls exec_setexecdata.

Let's just make the code stronger for now, it makes sense anyway. We
however may need to initialize std_ports automatically to make using a
sub exec easier. We "just" need to determine what makes sense.

Samuel Thibault <sthibaul>
Group administrator
Sat 27 Aug 2016 05:09:21 AM UTC, original submission:  

The exec server can be made to dereference a NULL pointer when exec'ing a shell script

Reproducing this bug requires a fresh instantiation of the exec server, and since ext2fs caches its port to the exec server, that means a fresh instantiation of ext2fs, too.


touch exec ramdisk mnt
settrans --active ramdisk /hurd/storeio -T copy zero:32M
mkfs.ext2 -F -b 4096 ramdisk
settrans --active exec /hurd/exec
remap /servers/exec $PWD/exec
...now in the remap shell...
settrans --active mnt /hurd/ext2fs ramdisk
cp /bin/which mnt
./mnt/which


The problem is around lines 108-126 of hashexec.c.  If exec_setexecdata is never called, then this code is reached with std_ports NULL.


Brent Baccala <baccala>

 

(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 sthibaul (Posted a comment)
  • -email is unavailable- added by baccala (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
    2016-08-28 sthibaul StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code