diff options
author | Joe Orton <jorton@apache.org> | 2009-05-08 14:13:15 +0000 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2009-05-08 14:13:15 +0000 |
commit | 489bc420ddbbb3ba7bd6f4b8b8e44fc4183deaf0 (patch) | |
tree | 81e278677e42d8ad3874e46d8b824ae1dde4b8fd /include | |
parent | 6ea0ab9e0af61eb500c3b34b49559aa999147c3c (diff) | |
download | httpd-489bc420ddbbb3ba7bd6f4b8b8e44fc4183deaf0.tar.gz |
Security fix for CVE-2009-1195: fix Options handling such that
'AllowOverride Options=IncludesNoExec' does not permit Includes with
exec= enabled to be configured in an .htaccess file:
* include/http_core.h: Change semantics of Includes/IncludeNoExec
options bits to be additive; OPT_INCLUDES now means SSI is enabled
without exec=. OPT_INCLUDES|OPT_INC_WITH_EXEC means SSI is enabled
with exec=.
* server/core.c (create_core_dir_config): Remove defunct OPT_INCNOEXEC
from default override_opts; no functional change.
(merge_core_dir_configs): Update logic to ensure that exec= is
disabled in a context where IncludesNoexec is configured, even if
Includes-with-exec is permitted in the inherited options set.
(set_allow_opts, set_options): Update to reflect new semantics
of OPT_INCLUDES, OPT_INC_WITH_EXEC.
* server/config.c: Update to remove OPT_INCNOEXEC from default
override_opts; no functional change.
* modules/filters/mod_include.c (includes_filter): Update to reflect
new options semantics - disable exec= support if the
OPT_INC_WITH_EXEC bit is not set.
Submitted by: Jonathan Peatfield <j.s.peatfield damtp.cam.ac.uk>,
jorton
Thanks to: Vincent Danon <vdanon redhat.com>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@772997 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r-- | include/http_core.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/http_core.h b/include/http_core.h index 1c34c783a4..da4b8e6c80 100644 --- a/include/http_core.h +++ b/include/http_core.h @@ -68,7 +68,7 @@ extern "C" { #define OPT_NONE 0 /** Indexes directive */ #define OPT_INDEXES 1 -/** Includes directive */ +/** SSI is enabled without exec= permission */ #define OPT_INCLUDES 2 /** FollowSymLinks directive */ #define OPT_SYM_LINKS 4 @@ -76,14 +76,14 @@ extern "C" { #define OPT_EXECCGI 8 /** directive unset */ #define OPT_UNSET 16 -/** IncludesNOEXEC directive */ -#define OPT_INCNOEXEC 32 +/** SSI exec= permission is permitted, iff OPT_INCLUDES is also set */ +#define OPT_INC_WITH_EXEC 32 /** SymLinksIfOwnerMatch directive */ #define OPT_SYM_OWNER 64 /** MultiViews directive */ #define OPT_MULTI 128 /** All directives */ -#define OPT_ALL (OPT_INDEXES|OPT_INCLUDES|OPT_SYM_LINKS|OPT_EXECCGI) +#define OPT_ALL (OPT_INDEXES|OPT_INCLUDES|OPT_INC_WITH_EXEC|OPT_SYM_LINKS|OPT_EXECCGI) /** @} */ /** |