Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 910266 Details for
Bug 1111034
CVE-2014-8583 mod_wsgi: failure to handle errors when attempting to drop group privileges
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
mod_wsgi-4.2.3 Vs mod_wsgi-4.2.4 diff
wsgi-3-4.diff (text/plain), 9.18 KB, created by
Murray McAllister
on 2014-06-19 06:17:27 UTC
(
hide
)
Description:
mod_wsgi-4.2.3 Vs mod_wsgi-4.2.4 diff
Filename:
MIME Type:
Creator:
Murray McAllister
Created:
2014-06-19 06:17:27 UTC
Size:
9.18 KB
patch
obsolete
>diff -u -r mod_wsgi-4.2.3/docs/release-notes/index.rst mod_wsgi-4.2.4/docs/release-notes/index.rst >--- mod_wsgi-4.2.3/docs/release-notes/index.rst 2014-06-17 17:06:26.000000000 +1000 >+++ mod_wsgi-4.2.4/docs/release-notes/index.rst 2014-06-18 21:18:49.000000000 +1000 >@@ -5,6 +5,7 @@ > .. toctree:: > :maxdepth: 2 > >+ version-4.2.4.rst > version-4.2.3.rst > version-4.2.2.rst > version-4.2.1.rst >Only in mod_wsgi-4.2.4/docs/release-notes: version-4.2.4.rst >diff -u -r mod_wsgi-4.2.3/src/server/__init__.py mod_wsgi-4.2.4/src/server/__init__.py >--- mod_wsgi-4.2.3/src/server/__init__.py 2014-06-17 17:06:26.000000000 +1000 >+++ mod_wsgi-4.2.4/src/server/__init__.py 2014-06-18 21:18:49.000000000 +1000 >@@ -1060,6 +1060,14 @@ > optparse.make_option('--enable-docs', action='store_true', default=False, > help='Flag indicating whether the mod_wsgi documentation should ' > 'be made available at the /__wsgi__/docs sub URL.'), >+ >+ optparse.make_option('--setup-only', action='store_true', default=False, >+ help='Flag indicating that after the configuration files have ' >+ 'been setup, that the command should then exit and not go on ' >+ 'to actually run up the Apache server. This is to allow for ' >+ 'the generation of the configuration with Apache then later ' >+ 'being started separately using the generated \'apachectl\' ' >+ 'script.'), > ) > > def cmd_setup_server(params): >@@ -1350,7 +1358,7 @@ > if options['envvars_script']: > print('Environ Variables :', options['envvars_script']) > >- if command == 'setup-server': >+ if command == 'setup-server' or options['setup_only']: > if not options['envvars_script']: > print('Environ Variables :', options['server_root'] + '/envvars') > print('Control Script :', options['server_root'] + '/apachectl') >@@ -1369,6 +1377,9 @@ > > config = _cmd_setup_server('start-server', args, vars(options)) > >+ if config['setup_only']: >+ return >+ > executable = os.path.join(config['server_root'], 'apachectl') > name = executable.ljust(len(config['process_name'])) > os.execl(executable, name, 'start', '-DNO_DETACH') >diff -u -r mod_wsgi-4.2.3/src/server/management/commands/runmodwsgi.py mod_wsgi-4.2.4/src/server/management/commands/runmodwsgi.py >--- mod_wsgi-4.2.3/src/server/management/commands/runmodwsgi.py 2014-06-17 17:06:26.000000000 +1000 >+++ mod_wsgi-4.2.4/src/server/management/commands/runmodwsgi.py 2014-06-18 21:18:49.000000000 +1000 >@@ -8,7 +8,7 @@ > > class Command(BaseCommand): > option_list = BaseCommand.option_list + mod_wsgi.server.option_list >- args = '[options]' >+ args = '' > help = 'Starts Apache/mod_wsgi web server.' > > def handle(self, *args, **options): >@@ -47,6 +47,9 @@ > options = mod_wsgi.server._cmd_setup_server( > 'start-server', args, options) > >+ if options['setup_only']: >+ return >+ > executable = os.path.join(options['server_root'], 'apachectl') > name = executable.ljust(len(options['process_name'])) > os.execl(executable, name, 'start', '-DNO_DETACH') >diff -u -r mod_wsgi-4.2.3/src/server/mod_wsgi.c mod_wsgi-4.2.4/src/server/mod_wsgi.c >--- mod_wsgi-4.2.3/src/server/mod_wsgi.c 2014-06-17 17:06:26.000000000 +1000 >+++ mod_wsgi-4.2.4/src/server/mod_wsgi.c 2014-06-18 21:18:49.000000000 +1000 >@@ -6690,7 +6690,7 @@ > group_name = ap_getword(cmd->pool, &items, ','); > > while (group_name && *group_name) { >- if (groups_count > groups_maximum) >+ if (groups_count >= groups_maximum) > return "Too many supplementary groups WSGI daemon process"; > > groups[groups_count++] = ap_gname2id(group_name); >@@ -7087,7 +7087,7 @@ > #endif > } > >-static void wsgi_setup_access(WSGIDaemonProcess *daemon) >+static int wsgi_setup_access(WSGIDaemonProcess *daemon) > { > /* Setup the umask for the effective user. */ > >@@ -7101,6 +7101,8 @@ > ap_log_error(APLOG_MARK, APLOG_ALERT, errno, wsgi_server, > "mod_wsgi (pid=%d): Unable to change root " > "directory to '%s'.", getpid(), daemon->group->root); >+ >+ return -1; > } > } > >@@ -7111,6 +7113,8 @@ > ap_log_error(APLOG_MARK, APLOG_ALERT, errno, wsgi_server, > "mod_wsgi (pid=%d): Unable to change working " > "directory to '%s'.", getpid(), daemon->group->home); >+ >+ return -1; > } > } > else if (geteuid()) { >@@ -7123,12 +7127,16 @@ > ap_log_error(APLOG_MARK, APLOG_ALERT, errno, wsgi_server, > "mod_wsgi (pid=%d): Unable to change working " > "directory to '%s'.", getpid(), pwent->pw_dir); >+ >+ return -1; > } > } > else { > ap_log_error(APLOG_MARK, APLOG_ALERT, errno, wsgi_server, > "mod_wsgi (pid=%d): Unable to determine home " > "directory for uid=%ld.", getpid(), (long)geteuid()); >+ >+ return -1; > } > } > else { >@@ -7141,6 +7149,8 @@ > ap_log_error(APLOG_MARK, APLOG_ALERT, errno, wsgi_server, > "mod_wsgi (pid=%d): Unable to change working " > "directory to '%s'.", getpid(), pwent->pw_dir); >+ >+ return -1; > } > } > else { >@@ -7148,13 +7158,15 @@ > "mod_wsgi (pid=%d): Unable to determine home " > "directory for uid=%ld.", getpid(), > (long)daemon->group->uid); >+ >+ return -1; > } > } > > /* Don't bother switch user/group if not root. */ > > if (geteuid()) >- return; >+ return 0; > > /* Setup the daemon process real and effective group. */ > >@@ -7162,6 +7174,8 @@ > ap_log_error(APLOG_MARK, APLOG_ALERT, errno, wsgi_server, > "mod_wsgi (pid=%d): Unable to set group id to gid=%u.", > getpid(), (unsigned)daemon->group->gid); >+ >+ return -1; > } > else { > if (daemon->group->groups) { >@@ -7172,6 +7186,8 @@ > "to set supplementary groups for uname=%s " > "of '%s'.", getpid(), daemon->group->user, > daemon->group->groups_list); >+ >+ return -1; > } > } > else if (initgroups(daemon->group->user, daemon->group->gid) == -1) { >@@ -7179,6 +7195,8 @@ > wsgi_server, "mod_wsgi (pid=%d): Unable " > "to set groups for uname=%s and gid=%u.", getpid(), > daemon->group->user, (unsigned)daemon->group->gid); >+ >+ return -1; > } > } > >@@ -7196,8 +7214,19 @@ > * reached their process limit. In that case will be left > * running as wrong user. Just exit on all failures to be > * safe. Don't die immediately to avoid a fork bomb. >+ * >+ * We could just return -1 here and let the caller do the >+ * sleep() and exit() but this failure is critical enough >+ * that we still do it here so it is obvious that the issue >+ * is being addressed. > */ > >+ ap_log_error(APLOG_MARK, APLOG_ALERT, 0, wsgi_server, >+ "mod_wsgi (pid=%d): Failure to configure the " >+ "daemon process correctly and process left in " >+ "unspecified state. Restarting daemon process " >+ "after delay.", getpid()); >+ > sleep(20); > > exit(-1); >@@ -7219,6 +7248,8 @@ > } > } > #endif >+ >+ return 0; > } > > static int wsgi_setup_socket(WSGIProcessGroup *process) >@@ -8561,7 +8592,24 @@ > > /* Setup daemon process user/group/umask etc. */ > >- wsgi_setup_access(daemon); >+ if (wsgi_setup_access(daemon) == -1) { >+ /* >+ * If we get any failure from setting up the appropriate >+ * permissions or working directory for the daemon process >+ * then we exit the process. Don't die immediately to avoid >+ * a fork bomb. >+ */ >+ >+ ap_log_error(APLOG_MARK, APLOG_ALERT, 0, wsgi_server, >+ "mod_wsgi (pid=%d): Failure to configure the " >+ "daemon process correctly and process left in " >+ "unspecified state. Restarting daemon process " >+ "after delay.", getpid()); >+ >+ sleep(20); >+ >+ exit(-1); >+ } > > /* Reinitialise accept mutex in daemon process. */ > >diff -u -r mod_wsgi-4.2.3/src/server/wsgi_version.h mod_wsgi-4.2.4/src/server/wsgi_version.h >--- mod_wsgi-4.2.3/src/server/wsgi_version.h 2014-06-17 17:06:26.000000000 +1000 >+++ mod_wsgi-4.2.4/src/server/wsgi_version.h 2014-06-18 21:18:49.000000000 +1000 >@@ -25,8 +25,8 @@ > > #define MOD_WSGI_MAJORVERSION_NUMBER 4 > #define MOD_WSGI_MINORVERSION_NUMBER 2 >-#define MOD_WSGI_MICROVERSION_NUMBER 3 >-#define MOD_WSGI_VERSION_STRING "4.2.3" >+#define MOD_WSGI_MICROVERSION_NUMBER 4 >+#define MOD_WSGI_VERSION_STRING "4.2.4" > > /* ------------------------------------------------------------------------- */ >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1111034
: 910266