You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Marc Slemko <ma...@znep.com> on 1997/06/09 04:44:59 UTC
IncludesNOEXEC and include virtual
With IncludesNOEXEC you can do an include virtual of a script in a
ScriptAliased directory but not of a CGI script outside of one.
Is that how it is supposed to be? I would think it would be a good
thing to allow execution of all CGI scripts that could otherwise be
executed...
Re: IncludesNOEXEC and include virtual
Posted by Marc Slemko <ma...@worldgate.com>.
Something is bogus here. The manual:
include
This command inserts the text of another document or file into
the parsed file. Any included file is subject to the usual
access control. If the directory containing the parsed file has
the Option IncludesNOEXEC set, and the including the document
would cause a program to be executed, then it will not be
included; this prevents the execution of CGI scripts. Otherwise
CGI scripts are invoked as normal using the complete URL given
in the command, including any query string.
However this is _not_ true. The current code allows ScriptAliased
directories through (because the subrequest content type is null)
but not CGI scripts done with an AddHandler (because the content type
is not null and is not text/*).
My feeling is that include virtual should be defined as doing nearly
exactly the same thing that a request for that page would; if it means
executing a CGI that would be executed if requested directly, do it
even if IncludesNOEXEC is set.
ISTR people always saying "use include virtual" whenever someone brought
up adding a new directive to allow for you to allow people to include
CGIs that are really CGIs but not any odd script...
On Sun, 8 Jun 1997, Marc Slemko wrote:
> With IncludesNOEXEC you can do an include virtual of a script in a
> ScriptAliased directory but not of a CGI script outside of one.
>
> Is that how it is supposed to be? I would think it would be a good
> thing to allow execution of all CGI scripts that could otherwise be
> executed...
>
Re: IncludesNOEXEC and include virtual
Posted by "Jason A. Dour" <ja...@bcc.louisville.edu>.
-----BEGIN PGP SIGNED MESSAGE-----
On Tue, 10 Jun 1997, Chuck Murcko wrote:
> Brian Behlendorf wrote:
> >
> > On Sun, 8 Jun 1997, Marc Slemko wrote:
> > > Right now it behaves neither way, allowing some and disallowing all.
> > > Unless someone can propose a security problem, my vote is for allowing
> > > include virtual to execute CGIs that would be executed anyway.
> >
> > +1
> >
> > Brian
> +1
> --
> chuck
> Chuck Murcko
> The Topsail Group, West Chester PA USA
> chuck@topsail.org
+1 as well...I had to hack this into our server a long time ago...
Jason
# Jason A. Dour <ja...@bcc.louisville.edu> 1101
# Programmer Analyst II; Department of Radiation Oncology; Univ. of Lou.
# Finger for URLs, PGP public key, geek code, PJ Harvey info, et cetera.
-----BEGIN PGP SIGNATURE-----
Version: 2.6.2
iQCVAwUBM56a85o1JaC71RLxAQFnSQQAlzJiffR5YvxuLdBEZBbtsAY7DY5pqnQU
zEmD9nDxdfn4XCa3raKLPktTFoYlUhA6BoknIm+3SK6l41vy6uROPt9ggnCGCTB0
RymAS8gkJqDpQ0+ZMAQ9b+JQNa8hko+M9lxDMNFgQ5KwyRL3yvixrqTH71JJawe6
P7vxIxZuEhs=
=lQF2
-----END PGP SIGNATURE-----
Re: IncludesNOEXEC and include virtual
Posted by Chuck Murcko <ch...@topsail.org>.
Brian Behlendorf wrote:
>
> On Sun, 8 Jun 1997, Marc Slemko wrote:
> > Right now it behaves neither way, allowing some and disallowing all.
> > Unless someone can propose a security problem, my vote is for allowing
> > include virtual to execute CGIs that would be executed anyway.
>
> +1
>
> Brian
+1
--
chuck
Chuck Murcko
The Topsail Group, West Chester PA USA
chuck@topsail.org
Re: IncludesNOEXEC and include virtual
Posted by Brian Behlendorf <br...@organic.com>.
On Sun, 8 Jun 1997, Marc Slemko wrote:
> Right now it behaves neither way, allowing some and disallowing all.
> Unless someone can propose a security problem, my vote is for allowing
> include virtual to execute CGIs that would be executed anyway.
+1
Brian
Re: IncludesNOEXEC and include virtual
Posted by Marc Slemko <ma...@worldgate.com>.
Hmm, looking back over the list archives it appears that this was dicussed
(back in '95 even... with Rob M. still around) but no decision was made.
robh didn't like IncludesNOEXEC allowing inclusion of CGIs,
Brian did and vetoed a proposed IncludesYESCGINOCMD or something like that
because he thought IncludesNOEXEC should allow CGIs.
Roy didn't like changing IncludesNOEXEC and liked adding another directive
(IncludesNoExecCMD) to just disable exec.
This is back in the days of v0.6...
Right now it behaves neither way, allowing some and disallowing all.
Unless someone can propose a security problem, my vote is for allowing
include virtual to execute CGIs that would be executed anyway.
It already does so for ScriptAliased directories, just AddHandlered
scripts that it doesn't.
On Sun, 8 Jun 1997, Marc Slemko wrote:
> On Sun, 8 Jun 1997, Alexei Kosut wrote:
>
> > On Sun, 8 Jun 1997, Marc Slemko wrote:
> >
> > > With IncludesNOEXEC you can do an include virtual of a script in a
> > > ScriptAliased directory but not of a CGI script outside of one.
> > >
> > > Is that how it is supposed to be? I would think it would be a good
> > > thing to allow execution of all CGI scripts that could otherwise be
> > > executed...
> >
> > If that's true (and I haven't tried it yet), it's defenitely a bug;
> > Includes vs. IncludesNoExec should have absolutely no impact on
> > include virtual.
>
>
> It is due to this bit of code in mod_include:
>
> if (!error_fmt && noexec && rr->content_type
> && (strncmp (rr->content_type, "text/", 5))) {
> error_fmt =
> "unable to include potential exec %s in parsed file %s";
> }
>
> This code tries to play it safe by not allowing anything other than text/*
> files to be included in a noexec. Is that whole statement bogus? It does
> nothing for exec cgi because that is handled by a different subroutine,
> and if something can get through a sub_req_lookup_* wouldn't it be allowed
> to happen anyway? ie. any execution that shouldn't happen would be denied
> by the normal methods.
>
> The only reason I can see for that being there is paranoia (perhaps
> justified...) over sub requests being broken.
>
Re: IncludesNOEXEC and include virtual
Posted by Marc Slemko <ma...@worldgate.com>.
On Sun, 8 Jun 1997, Alexei Kosut wrote:
> On Sun, 8 Jun 1997, Marc Slemko wrote:
>
> > With IncludesNOEXEC you can do an include virtual of a script in a
> > ScriptAliased directory but not of a CGI script outside of one.
> >
> > Is that how it is supposed to be? I would think it would be a good
> > thing to allow execution of all CGI scripts that could otherwise be
> > executed...
>
> If that's true (and I haven't tried it yet), it's defenitely a bug;
> Includes vs. IncludesNoExec should have absolutely no impact on
> include virtual.
It is due to this bit of code in mod_include:
if (!error_fmt && noexec && rr->content_type
&& (strncmp (rr->content_type, "text/", 5))) {
error_fmt =
"unable to include potential exec %s in parsed file %s";
}
This code tries to play it safe by not allowing anything other than text/*
files to be included in a noexec. Is that whole statement bogus? It does
nothing for exec cgi because that is handled by a different subroutine,
and if something can get through a sub_req_lookup_* wouldn't it be allowed
to happen anyway? ie. any execution that shouldn't happen would be denied
by the normal methods.
The only reason I can see for that being there is paranoia (perhaps
justified...) over sub requests being broken.
Re: IncludesNOEXEC and include virtual
Posted by Alexei Kosut <ak...@nueva.pvt.k12.ca.us>.
On Sun, 8 Jun 1997, Marc Slemko wrote:
> With IncludesNOEXEC you can do an include virtual of a script in a
> ScriptAliased directory but not of a CGI script outside of one.
>
> Is that how it is supposed to be? I would think it would be a good
> thing to allow execution of all CGI scripts that could otherwise be
> executed...
If that's true (and I haven't tried it yet), it's defenitely a bug;
Includes vs. IncludesNoExec should have absolutely no impact on
include virtual.
--
________________________________________________________________________
Alexei Kosut <ak...@nueva.pvt.k12.ca.us> The Apache HTTP Server
URL: http://www.nueva.pvt.k12.ca.us/~akosut/ http://www.apache.org/