bugdavfs2 - Bugs: bug #33644, check for group membership does...

 
 

bug #33644: check for group membership does not work in any case

Submitted by:  None
Submitted on:  Sat 25 Jun 2011 04:39:19 PM UTC  
 
Category: NoneSeverity: 4 - Important
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Werner Baumann <wbaumann>
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Wed 12 Mar 2014 05:05:50 PM UTC, comment #8:

Fixed in CVS branch MAIN and branch rel-1-4-6

Werner Baumann <wbaumann>
Project AdministratorIn charge of this item.
Thu 19 Jul 2012 04:25:18 PM UTC, comment #7:

These are indeed three different bugs.

Two of them are fixed in version 1.4.7

But this one is still open:
However, AFAIK the function has_permission still has another, less important, issue: Using mode xyz the file or directory will have mode (x|z)(y|z)z, because whenever an access will be allowed for "other" users, it will be granted.

Werner Baumann <wbaumann>
Project AdministratorIn charge of this item.
Sun 03 Jun 2012 10:37:44 AM UTC, comment #6:

Thanks for hinting at these two bugs.
The first one (strcmp.. == 0) is now fixed in CVS.
The second one will take some time.

Cheers
Werner

Werner Baumann <wbaumann>
Project AdministratorIn charge of this item.
Mon 14 May 2012 03:37:45 PM UTC, comment #5:

The quick fix of this security problem is rather simple, you only have to change strcmp … == 0 to strmp … != 0 in the function "has_permission" in cache.c.

However, AFAIK the function has_permission still has another, less important, issue: Using mode xyz the file or directory will have mode (x|z)(y|z)z, because whenever an access will be allowed for "other" users, it will be granted.

Greetings,
Benedikt

Benedikt Wildenhain <bwildenhain>
Thu 06 Oct 2011 06:31:29 PM UTC, comment #4:

I think this problem is unrelated.

Please open a new support tracker item. Usefull additional information would be:

  • does this problem only arise whem mounting with autofs?
  • the fstab entry.
  • when mounting with autofs: please add option 'debug most' to your config file before the file system is mounted. When the file system is mounted do a simple read for one small file and include the mount.davfs log entries.

Werner

Werner Baumann <wbaumann>
Project AdministratorIn charge of this item.
Wed 05 Oct 2011 05:39:48 PM UTC, comment #3:

Could this bug be the reason for my problem with using davfs2 with autofs, where by setting the dir_mode=770,file_mode=660, I see the correct UNIX permissions set (rwxrwx---), but still can access mounted folders even if I'm not in the correct group?

(Can get back with more details if it is related ... otherwise I guess I should issue a new bug?)

Samuel Lampa <samuellampa>
Sat 25 Jun 2011 04:39:19 PM UTC, comment #2:

This item has been reassigned from the project davfs2 support tracker to your tracker.

The original report is still available at support #107725

Following are the information included in the original report:

[field #0] Item ID: 107725
[field #1] Group ID: 10199
[field #2] Open/Closed: Open
[field #3] Severity: 4 - Important
[field #4] Privacy: Public
[field #7] : Unknown support Field Display Type
[field #8] : Unknown support Field Display Type
[field #9] Category: None
[field #10] Submitted by: None
[field #11] Assigned to: wbaumann
[field #12] Submitted on: Tue 21 Jun 2011 04:21:19 PM GMT
[field #13] Summary: check for group membership does not work in any case
[field #14] Original Submission: In my case the davfs2 group is added via pam_group.so

This results in an empty list as getgrent result.

Everything works fine however if getgroups is used instead of getgrent for checking group memberships.

The attached patch is doing exactly this.
[field #16] Item Group: None
[field #17] Status: Confirmed
[field #18] Component Version: None
[field #19] Operating System: GNU/Linux
[field #20] Reproducibility: None
[field #21] Size (loc): None
[field #22] Fixed Release: None
[field #23] Planned Release: None
[field #24] Effort: 0.00
[field #28] Priority: 5 - Normal
[field #31] Percent Complete: 0%
[field #33] Release: None
[field #36] Originator Email: sven-savannah-bugs@geggus.net
[field #58] Custom Select Box #1: None
[field #59] Custom Select Box #2: None
[field #60] Custom Select Box #3: None
[field #61] Custom Select Box #4: None
[field #62] Custom Select Box #5: None
[field #63] Custom Select Box #6: None
[field #64] Custom Select Box #7: None
[field #65] Custom Select Box #8: None
[field #66] Custom Select Box #9: None
[field #67] Custom Select Box #10: None

Werner Baumann <wbaumann>
Project AdministratorIn charge of this item.
Sat 25 Jun 2011 04:38:26 PM UTC, comment #1:

Thanks for the report and the patch and sorry for the delayed answer (I always intended to answer first thing next day).

Because of portability issues with seteuid I want to reorganize all the code that deals with the persona of the process. When doing this I will follow your advice and use getgroups.

I will move this item to the bug tracker so I will not forgett about it.

Cheers
Werner

Werner Baumann <wbaumann>
Project AdministratorIn charge of this item.
Sat 25 Jun 2011 04:39:19 PM UTC, original submission:

In my case the davfs2 group is added via pam_group.so

This results in an empty list as getgrent result.

Everything works fine however if getgroups is used instead of getgrent for checking group memberships.

The attached patch is doing exactly this.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #23546:  getgroups.diff added by None (1kB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bwildenhain (Posted a comment)
  • -unavailable- added by samuellampa (Posted a comment)
  • -unavailable- added by wbaumann (Posted a comment)
  • -unavailable- added by None (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 12 Mar 2014 05:05:50 PM UTCwbaumannStatusPostponed=>Fixed
    Thu 19 Jul 2012 04:25:18 PM UTCwbaumannStatusIn Progress=>Postponed
    Sat 25 Jun 2011 04:41:36 PM UTCwbaumannStatusNone=>In Progress
      Assigned toNone=>wbaumann
    Sat 25 Jun 2011 04:39:19 PM UTCwbaumannReassign itemdavfs2, sr #107725=>davfs2, bug #33644

    Back to the top


    Powered by Savane 3.1-cleanup