First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 80109
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Security <security@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Sune Kloppenborg Jeppesen <jaervosz@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:
Flags: Requestee:
 
 
  ()

Filename Description Type Creator Created Size Actions
publisher.diff publisher.diff patch Sune Kloppenborg Jeppesen 2005-01-30 22:28 0000 1.42 KB Details | Diff
publisher-2.diff publisher-2.diff patch Thierry Carrez (RETIRED) 2005-02-09 02:44 0000 1.35 KB Details | Diff
mod_python-3.1.3.ebuild mod_python-3.1.3.ebuild text/plain Rob Cakebread 2005-02-11 09:25 0000 1.83 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 80109 depends on: Show dependency tree
Bug 80109 blocks:

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-01-30 11:02 0000
Graham Dumpleton discovered a flaw which can affect anyone using the
publisher handle of the Apache Software Foundation mod_python.  The
publisher handle lets you publish objects inside modules to make them
callable via URL.  The flaw allows a carefully crafted URL to obtain extra
information that should not be visible (information leak).

Although this flaw is similar in nature to the Python issue bug #80094,
it has a lesser impact.
        The fix (tennatively) is this patch to the publisher.py file. As a 
        super-quick hack perhaps dissalowing access to anything that contains 
        "func_" in the apache config may be the way to go.

--- publisher.py.orig   Fri Jan 28 10:26:34 2005
+++ publisher.py        Fri Jan 28 10:33:22 2005
@@ -260,15 +260,31 @@
      (period) to find the last one we're looking for.
      """

-    for obj_str in  object_str.split('.'):
+    parts = object_str.split('.')
+
+    for n range(len(parts)):
+
          obj = getattr(obj, obj_str)
+        obj_type = type(obj)

-        # object cannot be a module
-        if type(obj) == ModuleType:
+        # object cannot be a module or a class
+        if obj_type in [ClassType, ModuleType]:
              raise apache.SERVER_RETURN, apache.HTTP_NOT_FOUND

-        realm, user, passwd = process_auth(req, obj, realm,
-                                           user, passwd)
+        if n < (len(parts)-1):
+
+            # all but the last object ...
+
+            # ...must be instance
+            if obj_type != InstanceType:
+                raise apache.SERVER_RETURN, apache.HTTP_NOT_FOUND
+
+            # ...can't be callable
+            if callable(obj):
+                raise apache.SERVER_RETURN, apache.HTTP_NOT_FOUND
+
+            realm, user, passwd = process_auth(req, obj, realm,
+                                               user, passwd)

      return obj

------- Comment #1 From Sune Kloppenborg Jeppesen 2005-01-30 11:03:49 0000 -------
POC given but not oncluded on this bug.

------- Comment #2 From Sune Kloppenborg Jeppesen 2005-01-30 22:28:58 0000 -------
Created an attachment (id=50028) [details]
publisher.diff

Updated patch.

------- Comment #3 From Thierry Carrez (RETIRED) 2005-02-09 02:44:56 0000 -------
Created an attachment (id=50803) [details]
publisher-2.diff

Better patch

------- Comment #4 From Sune Kloppenborg Jeppesen 2005-02-11 02:49:53 0000 -------
This is public now. Python please provide an updated ebuild.

------- Comment #5 From Rob Cakebread 2005-02-11 09:25:19 0000 -------
Created an attachment (id=51011) [details]
mod_python-3.1.3.ebuild

------- Comment #6 From Rob Cakebread 2005-02-11 11:46:35 0000 -------
Patched 3.1.3 and bumped it to 3.1.3-r1, added both to CVS

------- Comment #7 From Sune Kloppenborg Jeppesen 2005-02-11 12:00:47 0000 -------
This one is ready for GLSA.

------- Comment #8 From Elfyn McBratney (beu) (RETIRED) 2005-02-13 00:04:36 0000 -------

*** This bug has been marked as a duplicate of 81827 ***

------- Comment #9 From Elfyn McBratney (beu) (RETIRED) 2005-02-13 00:09:45 0000 -------
Re-opening - again, so so sorry people. :/

------- Comment #10 From Michael Stewart (vericgar) (RETIRED) 2005-02-13 00:15:49 0000 -------
*** Bug 81827 has been marked as a duplicate of this bug. ***

------- Comment #11 From Sune Kloppenborg Jeppesen 2005-02-13 02:17:47 0000 -------
GLSA 200502-14

------- Comment #12 From Matthias Geerdsen 2005-02-23 08:33:58 0000 -------
*** Bug 83074 has been marked as a duplicate of this bug. ***

------- Comment #13 From Stefan Cornelius (RETIRED) 2005-12-07 06:50:46 0000 -------
Reopening after a 3/4 year ...
Someone please mark mod_python-2.7.11 stable on x86 as it suffers the same
vulnerability and all apache1 users need this one to be secure. We might have to
update the glsa later, not sure atm.

------- Comment #14 From Bryan Østergaard (RETIRED) 2005-12-10 15:44:16 0000 -------
Stabled 2.7.11 on x86.

------- Comment #15 From Thierry Carrez (RETIRED) 2005-12-11 10:02:26 0000 -------
I think this one needs a GLSA update

------- Comment #16 From Sune Kloppenborg Jeppesen 2005-12-12 22:31:46 0000 -------
Updated i GLSAmaker, awaiting review. 

------- Comment #17 From Thierry Carrez (RETIRED) 2005-12-13 05:53:38 0000 -------
Looks OK except Resolution should read :

# emerge --sync
# emerge --ask --oneshot --verbose dev-python/mod_python

------- Comment #18 From Sune Kloppenborg Jeppesen 2005-12-13 06:47:26 0000 -------
Fixed in GLSAmaker without version bump. 

------- Comment #19 From Thierry Carrez (RETIRED) 2005-12-13 09:41:58 0000 -------
OK for me, clear to go.

------- Comment #20 From Sune Kloppenborg Jeppesen 2005-12-13 11:36:53 0000 -------
Committed. 
 
Thx Stefan. 

First Last Prev Next    No search results available      Search page      Enter new bug