Edgewall Software
Modify

Opened 17 years ago

Closed 14 years ago

Last modified 11 years ago

#6007 closed defect (fixed)

Security compromise - Restricted svn areas accessible through changeset browsing

Reported by: dan@… Owned by: Christian Boos
Priority: high Milestone: 0.12
Component: version control/browser Version: 0.10.4
Severity: critical Keywords: browser, security, changeset, svnauthz, authzsourcepolicy
Cc: dan@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Here is my auth file:

[groups]
dev = a, b

[repos:/]
@dev = rw

[repos:/project]
@dev = rw

[repos:/secretproject]
* =
a = rw

The repository looks like this:

 /
 +- project
 |
 +- secretproject
   |
   +- src
     |
     +- secretfile.cpp

I checked in secretproject in changeset 10

User a has full access to everything as expected. User b when clicking on the Browse Source button does not see secretproject. This is also expected.

In the Timeline, user b can see that changeset 10 happened. When viewing changeset 10, user b sees the following:

Files: src/secretfile.cpp

I would expect user b to not see any of the files under the secretproject directory.

If user b clicks on this file, the change set IS displayed, and the following URL is what gets this user to the file:

https://server.mycompany.com/trac/tracproject/browser/src/secretfile.cpp?rev=10

Once I have clicked on this link and viewed the file at changeset 10, an unexpected thing happens when I click back to Browse Source. At this point, the compromised directory shows up and I can browse down the src tree:

 /
 +- project
 |
 +- src
   |
   +- secretfile.cpp

Attachments (0)

Change History (15)

comment:1 by Noah Kantrowitz, 17 years ago

Please try using 0.10.4, many issues with this feature have been resolved since then.

comment:2 by Noah Kantrowitz, 17 years ago

Keywords: needinfo added

in reply to:  1 comment:3 by anonymous, 17 years ago

Version: 0.10.20.10.4

Replying to nkantrowitz:

Please try using 0.10.4, many issues with this feature have been resolved since then.

I finally had the time to upgrade. I'm working on 0.10.4, and the behavior as described above looks identical.

I'm changing the properties of this ticket to version 0.10.4

comment:4 by Christian Boos, 17 years ago

Keywords: verify added; needinfo removed
Milestone: 0.10.5

comment:5 by ThurnerRupert, 17 years ago

Keywords: verify removed
Milestone: 0.10.50.11
Resolution: worksforme
Status: newclosed

we are using 0.10.3 and do not see change sets of view restricted things nor the files itself via browse source. you are sure you entered the correct parameters, see e.g. http://lists.edgewall.com/archive/trac/2006-August/009131.html?

pls reopen if i am wrong.

what i did not check if subdirectories are restricted and a change set includes partially view restricted and not view restricted files.

comment:6 by Noah Kantrowitz, 17 years ago

Milestone: 0.110.10.5
Resolution: worksforme
Status: closedreopened

Nothing personal, but a core dev (preferably cboos since he knows this system the best probably) should really sign off on this first. Security issues need to be verified carefully.

in reply to:  5 ; comment:7 by anonymous, 17 years ago

Replying to ThurnerRupert:

we are using 0.10.3 and do not see change sets of view restricted things nor the files itself via browse source. you are sure you entered the correct parameters, see e.g. http://lists.edgewall.com/archive/trac/2006-August/009131.html?

pls reopen if i am wrong.

what i did not check if subdirectories are restricted and a change set includes partially view restricted and not view restricted files.

It looks as though I may have left out a critical details of this bug:

Change sets under the restricted areas are protected except for the initial checkin.

I'm did quite a bit more work with this yesterday and ran into this issue consistently when I checked the permissions. Is it possible that as I move things from a non-protected area into a protected area that the permissions might get strange? As a note: svn permissions are checked and guarded correctly.

If one of you would like to see actual screen shots of this behavior or a one-on-one demo of this, please feel free to contact me.

in reply to:  7 ; comment:8 by anonymous, 17 years ago

Replying to anonymous:

Replying to ThurnerRupert:

we are using 0.10.3 and do not see change sets of view restricted things nor the files itself via browse source. you are sure you entered the correct parameters, see e.g. http://lists.edgewall.com/archive/trac/2006-August/009131.html?

pls reopen if i am wrong.

what i did not check if subdirectories are restricted and a change set includes partially view restricted and not view restricted files.

It looks as though I may have left out a critical details of this bug:

Change sets under the restricted areas are protected except for the initial checkin.

I'm did quite a bit more work with this yesterday and ran into this issue consistently when I checked the permissions. Is it possible that as I move things from a non-protected area into a protected area that the permissions might get strange? As a note: svn permissions are checked and guarded correctly.

If one of you would like to see actual screen shots of this behavior or a one-on-one demo of this, please feel free to contact me.

OK… On further investigation, new areas that are added that have security enabled seem to be protected just fine with 10.4. It looks like areas that were moved out from public areas and into private areas are not protected correctly.

i.e.: SecretProject/src/secretfile.cpp (moved from Project/secretfile.cpp) is granting access to see SecretProject/src/secretfile.cpp in the changeset where the file was moved. Although I don't like the way this behaves, the file was in the non-restricted area at some point in the past. Is this truly a bug? Is it a behavior that can be changed?

in reply to:  8 comment:9 by Christian Boos, 16 years ago

Milestone: 0.10.50.12

Replying to anonymous:

i.e.: SecretProject/src/secretfile.cpp (moved from Project/secretfile.cpp) is granting access to see SecretProject/src/secretfile.cpp in the changeset where the file was moved. Although I don't like the way this behaves, the file was in the non-restricted area at some point in the past. Is this truly a bug? Is it a behavior that can be changed?

I think converting the svn_authz.py to a real permission policy should fix that issue.

comment:10 by anonymous, 16 years ago

Priority: highesthigh

comment:11 by Christian Boos, 15 years ago

Keywords: svnauthz added

comment:12 by Christian Boos, 14 years ago

Milestone: next-major-0.1X0.12

Tentatively put back to 0.12.

comment:13 by Remy Blank, 14 years ago

Isn't this fixed now with the AuthzSourcePolicy?

comment:14 by Remy Blank, 14 years ago

Resolution: fixed
Status: reopenedclosed

Closing as fixed (by the new AuthzSourcePolicy).

comment:15 by Ryan J Ollos, 11 years ago

Keywords: authzsourcepolicy added

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.