Bug 32589 - modules.update() should not DoS if an invalid module is installed
modules.update() should not DoS if an invalid module is installed
Status: RESOLVED DUPLICATE of bug 39013
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
UCS 3.0
Other Linux
: P5 normal (vote)
: UCS 3.2-x
Assigned To: UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-13 11:43 CEST by Arvid Requate
Modified: 2018-04-13 13:29 CEST (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
handle_invalid_modules.patch (1.21 KB, patch)
2013-09-13 11:43 CEST, Arvid Requate
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2013-09-13 11:43:02 CEST
Created attachment 5431 [details]
handle_invalid_modules.patch

univention.admin.modules.update() breaks in case an UDM module is installed without a __init__.py file. While this module is invalid, the UDM should not go into a DoS in this case. This becomes especially important in the context of Apps dynamically installing their own modules. Patch proposal attached.

================================================================================
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/univention/s4connector/s4/main.py", line 40, in <module>
    import univention.s4connector
  File "/usr/lib/pymodules/python2.6/univention/s4connector/__init__.py", line 49, in <module>
    univention.admin.modules.update()
  File "/usr/lib/pymodules/python2.6/univention/admin/modules.py", line 107, in update
    os.path.walk(dir, _walk, p)
  File "/usr/lib/python2.6/posixpath.py", line 236, in walk
    walk(name, func, arg)
  File "/usr/lib/python2.6/posixpath.py", line 228, in walk
    func(arg, top, names)
  File "/usr/lib/pymodules/python2.6/univention/admin/modules.py", line 91, in _walk
    m=__import__(mod, globals(), locals(), name)
ImportError: No module named appcenter.app
failed.
================================================================================
Comment 1 Florian Best univentionstaff 2016-05-09 08:04:24 CEST

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