bugThe GNU Hurd - Bugs: bug #26960, firmlink opens target with client...

 
 

bug #26960: firmlink opens target with client specified flags

Submitted by:  Carl Fredrik Hammar <hammy>
Submitted on:  Sat 04 Jul 2009 04:05:50 PM UTC  
 
Category: Hurd ServersSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: NonePrivacy: Public
Assigned to: NoneOriginator Name: 
Open/Closed: OpenReproducibility: None
Size (loc): NonePlanned Release: None
Effort: 0.00
Wiki-like text discussion box: 

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Tue 20 Sep 2016 10:54:09 PM UTC, comment #1:

Someone should write test cases for whether the patch causes problems with the following flags.

  • O_APPEND: Open a firmlink with O_APPEND and then use io_get_openmodes and verify that the O_APPEND bit is there.
  • O_NOATIME: Open a firmlink with O_NOATIME, use io_read, close the file_t and check that the atime of the target file remains unchanged.
  • O_NONBLOCK
  • O_ASYNC
  • others?

If the firmlink translator doesn't pass O_APPEND to the dir_lookup call, but its caller ends up doing another dir_lookup and setting O_APPEND there, then it's okay, provided that the RPC responses from the firmlink translator are such that the caller cannot expect the file_t to work right if it omits the second dir_lookup.

Kalle Olavi Niemitalo <kon>
Sat 04 Jul 2009 04:05:50 PM UTC, original submission:

firmlink opens its target file with any client specified open
flags, except O_CREAT. This makes it is possible for a client
to read or write to the target of a firmlink using the firmlink's
authority (io_restrict_auth is not enough). It is also possible
for the client to halt firmlink's look-up midway through, using
O_NOLINK and O_NOTRANS.

A patch that fixes it has been attached. Also a program that
exploits the security-hole, just run it on a firmlink to a target
that it should not be permitted to read.

Carl Fredrik Hammar <hammy>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by kon (Posted a comment)
  • -unavailable- added by hammy (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
    Sat 04 Jul 2009 04:05:51 PM UTChammyAttached File-=>Added 0001-Don-t-pass-client-flags-to-internal-firmlink-look-up.patch, #18367
      Attached File-=>Added firmlink-read.c, #18368

    Back to the top


    Powered by Savane 3.1-cleanup