1 |
prometheanfire 13/05/24 14:54:20 |
2 |
|
3 |
Added: 0.2.3-CVE-2013-2030.patch |
4 |
Log: |
5 |
keystoneclient fix for CVE-2013-2030 |
6 |
|
7 |
(Portage version: 2.1.11.62/cvs/Linux x86_64, signed Manifest commit with key 0x2471eb3e40ac5ac3) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-python/python-keystoneclient/files/0.2.3-CVE-2013-2030.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/python-keystoneclient/files/0.2.3-CVE-2013-2030.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/python-keystoneclient/files/0.2.3-CVE-2013-2030.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: 0.2.3-CVE-2013-2030.patch |
16 |
=================================================================== |
17 |
From 1736e2ffb12f70eeebed019448bc14def48aa036 Mon Sep 17 00:00:00 2001 |
18 |
From: Dolph Mathews <dolph.mathews@×××××.com> |
19 |
Date: Wed, 8 May 2013 10:49:20 -0500 |
20 |
Subject: [PATCH] Securely create signing_dir (bug 1174608) |
21 |
|
22 |
Also verifies the security of an existing signing_dir. |
23 |
|
24 |
Change-Id: I0685b4274a94ad3974a2b2a7ab3f45830d3934bb |
25 |
--- |
26 |
keystoneclient/middleware/auth_token.py | 23 ++++++++++++++--------- |
27 |
1 file changed, 14 insertions(+), 9 deletions(-) |
28 |
|
29 |
diff --git a/keystoneclient/middleware/auth_token.py b/keystoneclient/middleware/auth_token.py |
30 |
index 0d0e124..e6cf99f 100644 |
31 |
--- a/keystoneclient/middleware/auth_token.py |
32 |
+++ b/keystoneclient/middleware/auth_token.py |
33 |
@@ -296,15 +296,20 @@ class AuthProtocol(object): |
34 |
self.signing_dirname = self._conf_get('signing_dir') |
35 |
self.LOG.info('Using %s as cache directory for signing certificate' % |
36 |
self.signing_dirname) |
37 |
- if (os.path.exists(self.signing_dirname) and |
38 |
- not os.access(self.signing_dirname, os.W_OK)): |
39 |
- raise ConfigurationError("unable to access signing dir %s" % |
40 |
- self.signing_dirname) |
41 |
- |
42 |
- if not os.path.exists(self.signing_dirname): |
43 |
- os.makedirs(self.signing_dirname) |
44 |
- #will throw IOError if it cannot change permissions |
45 |
- os.chmod(self.signing_dirname, stat.S_IRWXU) |
46 |
+ if os.path.exists(self.signing_dirname): |
47 |
+ if not os.access(self.signing_dirname, os.W_OK): |
48 |
+ raise ConfigurationError( |
49 |
+ 'unable to access signing_dir %s' % self.signing_dirname) |
50 |
+ if os.stat(self.signing_dirname).st_uid != os.getuid(): |
51 |
+ self.LOG.warning( |
52 |
+ 'signing_dir is not owned by %s' % os.getlogin()) |
53 |
+ current_mode = stat.S_IMODE(os.stat(self.signing_dirname).st_mode) |
54 |
+ if current_mode != stat.S_IRWXU: |
55 |
+ self.LOG.warning( |
56 |
+ 'signing_dir mode is %s instead of %s' % |
57 |
+ (oct(current_mode), oct(stat.S_IRWXU))) |
58 |
+ else: |
59 |
+ os.makedirs(self.signing_dirname, stat.S_IRWXU) |
60 |
|
61 |
val = '%s/signing_cert.pem' % self.signing_dirname |
62 |
self.signing_cert_file_name = val |
63 |
-- |
64 |
1.8.1.5 |