Bug 827568 (CVE-2013-2217) - VUL-0: CVE-2013-2217: python-suds: Insecure temporary directory use when initializing file-based URL cache
Summary: VUL-0: CVE-2013-2217: python-suds: Insecure temporary directory use when init...
Status: RESOLVED FIXED
Alias: CVE-2013-2217
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Deadline: 2013-07-17
Assignee: Security Team bot
QA Contact: Security Team bot
URL:
Whiteboard: maint:running:53409:moderate maint:re...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-01 08:53 UTC by Sebastian Krahmer
Modified: 2018-10-10 08:35 UTC (History)
6 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Krahmer 2013-07-01 08:53:14 UTC
Via OSS-sec:

> Hello Kurt, Steve, vendors,
>
> based on the public Red Hat Bugzilla report: [1]
> https://bugzilla.redhat.com/show_bug.cgi?id=978696
>
> by Ralph Loader:
>
> A insecure temporary directory use flaw was found in the way
> python-suds, a Python SOAP web services client library, performed
> initialization of its internal file-based URL cache (predictable
> location was used for directory to store the cached files). A local
> attacker could use this flaw to conduct symbolic link attacks,
> possibly leading to their ability for example the SOAP .wsdl
> metadata to redirect queries to a different host, than originally
> intended.
>
> The reasons for the current behaviour are detailed at: [2]
> https://bugzilla.redhat.com/show_bug.cgi?id=978696#c4
>
> Could you allocate a CVE id for this?
>
> Thank you && Regards, Jan. -- Jan iankko Lieskovsky / Red Hat
> Security Response Team
>
> P.S.: There doesn't seem to be an upstream patch available yet
> (afaik), but the fix is obvious - use more unpredictable routine
> for file-based URL cache directory location generation than
> Python's tempfile.gettempdir() (which is case tempfile.tempdir is
> None, defaults to '/tmp').
>

Please use CVE-2013-2217 for this issue.
Comment 2 Swamp Workflow Management 2013-07-01 22:00:16 UTC
bugbot adjusting priority
Comment 3 Swamp Workflow Management 2013-07-03 07:17:25 UTC
The SWAMPID for this issue is 53407.
This issue was rated as moderate.
Please submit fixed packages until 2013-07-17.
When done, please reassign the bug to security-team@suse.de.
Patchinfo will be handled by security team.
Comment 4 Swamp Workflow Management 2013-07-03 07:17:38 UTC
The SWAMPID for this issue is 53408.
This issue was rated as moderate.
Please submit fixed packages until 2013-07-17.
When done, please reassign the bug to security-team@suse.de.
Patchinfo will be handled by security team.
Comment 5 Swamp Workflow Management 2013-07-03 07:17:52 UTC
The SWAMPID for this issue is 53409.
This issue was rated as moderate.
Please submit fixed packages until 2013-07-17.
When done, please reassign the bug to security-team@suse.de.
Patchinfo will be handled by security team.
Comment 7 Marcus Meissner 2013-07-04 08:38:59 UTC
assign to Vincent (SLE maintainer) first, afterwards we can assign it to Peter Nixon again
Comment 8 Vincent Untz 2013-07-04 12:43:08 UTC
Sascha: would you be able to take care of this?
Comment 9 Sascha Peilicke 2013-07-04 14:16:23 UTC
Factory: sr#182211 
openSUSE: sr#182212
Comment 12 Bernhard Wiedemann 2013-07-04 15:00:28 UTC
This is an autogenerated message for OBS integration:
This bug (827568) was mentioned in
https://build.opensuse.org/request/show/182211 Factory / python-suds
Comment 13 Bernhard Wiedemann 2013-07-08 14:00:15 UTC
This is an autogenerated message for OBS integration:
This bug (827568) was mentioned in
https://build.opensuse.org/request/show/182501 Factory / python-suds
Comment 14 Sebastian Krahmer 2013-07-17 08:26:24 UTC
done for SLE
Comment 15 Swamp Workflow Management 2013-07-17 09:04:37 UTC
openSUSE-SU-2013:1208-1: An update that fixes one vulnerability is now available.

Category: security (moderate)
Bug References: 827568
CVE References: CVE-2013-2217
Sources used:
openSUSE 12.3 (src):    python-suds-0.4-5.4.1
openSUSE 12.2 (src):    python-suds-0.4-2.8.1
Comment 16 Swamp Workflow Management 2013-07-18 17:46:24 UTC
Update released for: python-suds
Products:
SUSE-CLOUD 1.0 (x86_64)
Comment 17 Michal Čihař 2013-11-05 10:07:11 UTC
I think patch used to fix this is wrong - it causes python-suds to create stale files in /tmp and it effectively disables the file cache as it won't ever load saved file. It might be better to disable use of FileCache unless it is configured for specific directory.
Comment 18 Marcus Meissner 2013-11-05 10:20:12 UTC
reopen and back to sascha then?
Comment 19 Sascha Peilicke 2013-11-21 14:59:53 UTC
(In reply to comment #17)
> I think patch used to fix this is wrong - it causes python-suds to create stale
> files in /tmp 

True, I think I could add a __del__() method to the FileCache object to remove the tmpdir if FileCache instances go out of scope.

> and it effectively disables the file cache as it won't ever load
> saved file. 

It depends how you use it. The tmpdir is used for as long as the FileCache object is alive. In the SUSE-Cloud context, it is only used as part of OpenStack Nova's VMWare driver in the compute daemon. Since that's a long-running process, that should actually be ok. 

It's less so for CLI tools that are started several times in short succession, I agree. But we don't have those ATM. 

> It might be better to disable use of FileCache unless it is
> configured for specific directory.

Not using an old cache and disabling it completely should end up with the same results. As you already imply, if the users provides a directory, it's his responsibility. But using mkdtemp sounds like a safe default.

So if that's wanted, I could add some cleanup. Long term, the better option is to move to another solution since suds is unmaintained since years.
Comment 20 Michal Čihař 2013-11-21 15:23:44 UTC
(In reply to comment #19)
> (In reply to comment #17)
> > and it effectively disables the file cache as it won't ever load
> > saved file. 
> 
> It depends how you use it. The tmpdir is used for as long as the FileCache
> object is alive. In the SUSE-Cloud context, it is only used as part of
> OpenStack Nova's VMWare driver in the compute daemon. Since that's a
> long-running process, that should actually be ok. 

Right - for long living instances it works as long as the object exists, in our case, it's used by command line utility executed from cron and it just leads to thousands of files in /tmp which are not deleted. That's how I actually found this problem :-). I've removed the security patch for us for now, and I was just wondering whether this can not be problem as well in released update.
Comment 21 Sascha Peilicke 2013-11-27 13:27:10 UTC
Ok, sr#29625 addresses that.
Comment 24 Swamp Workflow Management 2013-12-06 13:58:32 UTC
The SWAMPID for this issue is 55364.
This issue was rated as moderate.
Please submit fixed packages until 2013-12-20.
When done, please reassign the bug to security-team@suse.de.
Patchinfo will be handled by security team.
Comment 26 Sascha Peilicke 2013-12-06 14:51:11 UTC
sr#29826, with CVE numbers...
Comment 29 Sebastian Krahmer 2014-01-14 09:55:22 UTC
.
Comment 30 Swamp Workflow Management 2014-01-14 13:49:21 UTC
Update released for: python-suds
Products:
SUSE-CLOUD 2.0 (x86_64)
Comment 31 Swamp Workflow Management 2014-01-14 17:04:21 UTC
SUSE-SU-2014:0061-1: An update that fixes one vulnerability is now available.

Category: security (moderate)
Bug References: 827568
CVE References: CVE-2013-2217
Sources used:
SUSE Cloud 2.0 (src):    python-suds-0.4-0.18.1
Comment 33 Bernhard Wiedemann 2016-10-05 10:01:32 UTC
This is an autogenerated message for OBS integration:
This bug (827568) was mentioned in
https://build.opensuse.org/request/show/433308 Factory / python-suds-jurko
https://build.opensuse.org/request/show/433309 42.1 / python-suds-jurko
https://build.opensuse.org/request/show/433310 42.2 / python-suds-jurko
Comment 34 Swamp Workflow Management 2016-10-12 18:10:53 UTC
openSUSE-SU-2016:2516-1: An update that fixes one vulnerability is now available.

Category: security (moderate)
Bug References: 827568
CVE References: CVE-2013-2217
Sources used:
openSUSE Leap 42.1 (src):    python-suds-jurko-0.6-4.1
Comment 35 Swamp Workflow Management 2016-11-02 19:07:16 UTC
SUSE-SU-2016:2704-1: An update that fixes one vulnerability is now available.

Category: security (moderate)
Bug References: 827568
CVE References: CVE-2013-2217
Sources used:
SUSE OpenStack Cloud 6 (src):    python-suds-jurko-0.6-4.1