Debian Bug report logs - #607755
apache2: suexec-custom does not allow docroot=/ (trailing slash gets removed)

version graph

Package: apache2-suexec-custom; Maintainer for apache2-suexec-custom is Debian Apache Maintainers <[email protected]>; Source for apache2-suexec-custom is src:apache2 (PTS, buildd, popcon).

Reported by: Daniel Hahler <[email protected]>

Date: Tue, 21 Dec 2010 19:18:02 UTC

Severity: normal

Tags: wontfix

Merged with 599678

Found in version apache2/2.2.16-2

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Debian Apache Maintainers <[email protected]>:
Bug#607755; Package apache2.2-common. (Tue, 21 Dec 2010 19:18:04 GMT) (full text, mbox, link).


Acknowledgement sent to Daniel Hahler <[email protected]>:
New Bug report received and forwarded. Copy sent to Debian Apache Maintainers <[email protected]>. (Tue, 21 Dec 2010 19:18:05 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Daniel Hahler <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: apache2: suexec-custom does not allow docroot=/ (trailing slash gets removed)
Date: Tue, 21 Dec 2010 20:15:42 +0100
Package: apache2.2-common
Version: 2.2.16-1
Severity: normal

I want to use suexec-custom for a setup using mod_chroot, and therefore
want/have to use a DocumentRoot of "/" (which is the root of the
chroot).

Unfortunately there appears to be a bug in
debian/patches/202_suexec-custom.dpatch, function read_line, where
trailing space and slash get removed.
A trainling slash should not get removed here if it is the only char
(and refers to the root directory).

Thanks.

-- Package-specific info:
List of /etc/apache2/mods-enabled/*.load:
  actions alias auth_basic authn_file authz_default authz_groupfile
  authz_host authz_user autoindex cgi deflate dir env expires fastcgi
  headers mime negotiation php5 proxy proxy_http reqtimeout rewrite
  setenvif ssl status userdir
List of enabled php5 extensions:
  apc curl gd gmp mcrypt mysql mysqli pdo pdo_mysql

-- System Information:
Debian Release: squeeze/sid
  APT prefers maverick-updates
  APT policy: (500, 'maverick-updates'), (500, 'maverick-security'), (500, 'maverick-proposed'), (500, 'maverick-backports'), (500, 'maverick'), (10, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.36.2-blueyed (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages apache2 depends on:
ii  apache2-mpm-prefork    2.2.16-1ubuntu3.1 Apache HTTP Server - traditional n
ii  apache2.2-common       2.2.16-1ubuntu3.1 Apache HTTP Server common files

apache2 recommends no packages.

apache2 suggests no packages.

Versions of packages apache2.2-common depends on:
ii  apache2-utils          2.2.16-1ubuntu3.1 utility programs for webservers
ii  apache2.2-bin          2.2.16-1ubuntu3.1 Apache HTTP Server common binary f
ii  libmagic1              5.03-5ubuntu1     File type determination library us
ii  lsb-base               4.0-0ubuntu8      Linux Standard Base 4.0 init scrip
ii  mime-support           3.48-1ubuntu2     MIME files 'mime.types' & 'mailcap
ii  perl                   5.10.1-12ubuntu2  Larry Wall's Practical Extraction 
ii  procps                 1:3.2.8-9ubuntu3  /proc file system utilities

-- debconf-show failed




Information forwarded to [email protected], Debian Apache Maintainers <[email protected]>:
Bug#607755; Package apache2.2-common. (Tue, 21 Dec 2010 19:57:04 GMT) (full text, mbox, link).


Acknowledgement sent to [email protected]:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <[email protected]>. (Tue, 21 Dec 2010 19:57:04 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Stefan Fritsch <[email protected]>
To: Daniel Hahler <[email protected]>
Cc: [email protected], [email protected]
Subject: Re: Bug#607755: apache2: suexec-custom does not allow docroot=/ (trailing slash gets removed)
Date: Tue, 21 Dec 2010 20:54:49 +0100
tags 607755 wontfix
thanks

On Tuesday 21 December 2010, Daniel Hahler wrote:
> I want to use suexec-custom for a setup using mod_chroot, and
> therefore want/have to use a DocumentRoot of "/" (which is the
> root of the chroot).
> 
> Unfortunately there appears to be a bug in
> debian/patches/202_suexec-custom.dpatch, function read_line, where
> trailing space and slash get removed.
> A trainling slash should not get removed here if it is the only
> char (and refers to the root directory).

This is not a bug, but intentional (see the suexec man page in the 
apache2-suexec-custom package). Setting the docroot setting of suexec 
to / introduces a local privilege escalation vulnerability (at least 
in a non-chrooted environment). Therefore I will not lift this 
restriction.

However, I do invite you to discuss with me on the debian-apache 
mailing list how a reasonable chroot setup could look like. The result 
could then be documented on [1] and maybe be included in README.Debian 
in a future version.

I think for simple setups without cgi/fastcgi/..., the built-in 
chrootdir directive should simply work (i.e. ChrootDir /var/www).

For more complicated setups, it may be better to have something like 
this: The chroot in e.g. /srv/www, the html data in /srv/www/var/www, 
the DocumentRoot setting in Apache as /var/www. The real /var/www 
outside the chroot then must be a symlink to /srv/www/var/www.
With such a setup, you can copy stuff into the chroot in a way that 
all paths are identical inside and outside of the chroot. If your 
webapp has some configuration data e.g. in /etc/webapp, make that a 
symlink to /srv/www/etc/webapp and put the files there.

Does this sound like it could work for you?

[1] http://wiki.debian.org/Apache/Hardening




Added tag(s) wontfix. Request was from Stefan Fritsch <[email protected]> to [email protected]. (Tue, 21 Dec 2010 19:57:06 GMT) (full text, mbox, link).


Information forwarded to [email protected], Debian Apache Maintainers <[email protected]>:
Bug#607755; Package apache2.2-common. (Tue, 21 Dec 2010 21:15:04 GMT) (full text, mbox, link).


Acknowledgement sent to Daniel Hahler <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <[email protected]>. (Tue, 21 Dec 2010 21:15:04 GMT) (full text, mbox, link).


Message #17 received at [email protected] (full text, mbox, reply):

From: Daniel Hahler <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: Re: Bug#607755: apache2: suexec-custom does not allow docroot=/ (trailing slash gets removed)
Date: Tue, 21 Dec 2010 22:11:46 +0100
> This is not a bug, but intentional (see the suexec man page in the 
> apache2-suexec-custom package). Setting the docroot setting of suexec 
> to / introduces a local privilege escalation vulnerability (at least 
> in a non-chrooted environment). Therefore I will not lift this 
> restriction.

I understand this, but on the other hand I cannot see why such a
protection should get enforced here; I had to compile a custom suexec
now (or rather re-use a previously compiled one), with the the docroot
setting set to "/". I have not investigated, but the binary is from like
2007 and I might be missing other fixes to suexec because of this.

I think having to install a custom/extra package (apache2-suexec-custom)
and editing a config file in there is non-trivial enough to only get
users who know what they are doing "in danger".

The whole purpose of suexec-custom appears to be that admins do not have
to compile their own binary, but it does not work out in this case.

> However, I do invite you to discuss with me on the debian-apache 
> mailing list how a reasonable chroot setup could look like. The result 
> could then be documented on [1] and maybe be included in README.Debian 
> in a future version.
> 
> I think for simple setups without cgi/fastcgi/..., the built-in 
> chrootdir directive should simply work (i.e. ChrootDir /var/www).
> 
> For more complicated setups, it may be better to have something like 
> this: The chroot in e.g. /srv/www, the html data in /srv/www/var/www, 
> the DocumentRoot setting in Apache as /var/www. The real /var/www 
> outside the chroot then must be a symlink to /srv/www/var/www.
> With such a setup, you can copy stuff into the chroot in a way that 
> all paths are identical inside and outside of the chroot. If your 
> webapp has some configuration data e.g. in /etc/webapp, make that a 
> symlink to /srv/www/etc/webapp and put the files there.
> 
> Does this sound like it could work for you?
>
> [1] http://wiki.debian.org/Apache/Hardening

I am using the latter approach, but I have no "/var/www" below the
chroot directory, but am using /var/www as the chroot directly; I have
different document roots below this, like vhosts/foo.

I am using mod_fastcgi and mod_chroot; I have just learnt that ChrootDir
would be available in Apache2 itself, but it does not behave in the same
way like mod_chroot - e.g. it appears to chroot after starting fastcgi
(so the fastcgi processes are outside of the chroot).
(see
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/687275/comments/2
for more information)

My more modern approach is to setup a separate container (OpenVZ) for
each "virtual host" instead; this gets currently backed up by php5-fpm
and nginx. But despite not using Apache in this case, I would like to
improve the process of chrooting it anyway.


Cheers,
Daniel

-- 
http://daniel.hahler.de/




Bug reassigned from package 'apache2.2-common' to 'apache2-suexec-custom'. Request was from Stefan Fritsch <[email protected]> to [email protected]. (Tue, 01 Feb 2011 22:15:11 GMT) (full text, mbox, link).


Bug No longer marked as found in versions apache2/2.2.16-1. Request was from Stefan Fritsch <[email protected]> to [email protected]. (Tue, 01 Feb 2011 22:15:12 GMT) (full text, mbox, link).


Forcibly Merged 599678 607755. Request was from Stefan Fritsch <[email protected]> to [email protected]. (Tue, 01 Feb 2011 22:15:13 GMT) (full text, mbox, link).


Information forwarded to [email protected], Debian Apache Maintainers <[email protected]>:
Bug#607755; Package apache2-suexec-custom. (Tue, 20 Feb 2018 08:36:02 GMT) (full text, mbox, link).


Acknowledgement sent to [email protected]:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <[email protected]>. (Tue, 20 Feb 2018 08:36:03 GMT) (full text, mbox, link).


Information forwarded to [email protected], Debian Apache Maintainers <[email protected]>:
Bug#607755; Package apache2-suexec-custom. (Tue, 18 Jun 2019 05:00:03 GMT) (full text, mbox, link).


Acknowledgement sent to Hidroconta Trading Ltd. <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <[email protected]>. (Tue, 18 Jun 2019 05:00:03 GMT) (full text, mbox, link).


Message #33 received at [email protected] (full text, mbox, reply):

From: Hidroconta Trading Ltd. <[email protected]>
To: [email protected]
Subject: Quotation Inquiry #RFQ170619E - New Supplier
Date: 17 Jun 2019 00:38:15 -0700
Hello,

Our partners referred your company to us. Regarding your great products.
Please see required products, quantity and specifications as attached.

Kindly give us your lowest possible prices for FCL shipment.


Best Regards,

Wanda Rodriguez
Purchase Assistant

Hidroconta Trading Ltd.
Av. de Sta. Catalina,
60, 30012 Murcia, Spain
Phone: +34 968 26 77 66
Fax: +34 968 26 77 06



Information forwarded to [email protected], Debian Apache Maintainers <[email protected]>:
Bug#607755; Package apache2-suexec-custom. (Wed, 13 Nov 2019 09:27:03 GMT) (full text, mbox, link).


Acknowledgement sent to [email protected]:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <[email protected]>. (Wed, 13 Nov 2019 09:27:03 GMT) (full text, mbox, link).


Message #38 received at [email protected] (full text, mbox, reply):

From: "Nael M. Al Homoud" <[email protected]>
To: undisclosed-recipients:;
Subject: Investment Proposal
Date: Sun, 10 Nov 2019 00:28:46 +0000
[Message part 1 (text/plain, inline)]
Good day,

My associate from China wants to discuss a business investment deal with
you. I awaiting your response to enable us discuss about this business
investment

Nael M. Al Homoud
Executive Director & High Investment Committee Member@
The Arab Investment Co
www.taic.com [1]

  

Links:
------
[1] http://www.taic.com
[Message part 2 (text/html, inline)]

Information forwarded to [email protected], Debian Apache Maintainers <[email protected]>:
Bug#607755; Package apache2-suexec-custom. (Sun, 10 May 2020 08:45:18 GMT) (full text, mbox, link).


Acknowledgement sent to [email protected]:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <[email protected]>. (Sun, 10 May 2020 08:45:18 GMT) (full text, mbox, link).


Message #43 received at [email protected] (full text, mbox, reply):

From: "Nael M. Al Homoud" <[email protected]>
To: undisclosed-recipients:;
Subject: Investment Proposal
Date: Sun, 10 May 2020 09:37:26 +0100
[Message part 1 (text/plain, inline)]
Good day,

My associate from China wants to discuss a business investment deal with
you. I awaiting your response to enable us discuss about this business
investment

Nael M. Al Homoud
Executive Director & High Investment Committee Member@
The Arab Investment Co
www.taic.com [1]

  

Links:
------
[1] http://www.taic.com
[Message part 2 (text/html, inline)]

Information forwarded to [email protected], Debian Apache Maintainers <[email protected]>:
Bug#607755; Package apache2-suexec-custom. (Wed, 22 Sep 2021 07:57:09 GMT) (full text, mbox, link).


Acknowledgement sent to "Dorian Kwiatkowski" <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <[email protected]>. (Wed, 22 Sep 2021 07:57:09 GMT) (full text, mbox, link).


Message #48 received at [email protected] (full text, mbox, reply):

From: "Dorian Kwiatkowski" <[email protected]>
To: <[email protected]>
Subject: Fotowoltaika dla firm
Date: Wed, 22 Sep 2021 07:37:35 GMT
Dzień dobry,

kontaktuję się z Państwem, ponieważ dostrzegam możliwość redukcji opłat za prąd.

Odpowiednio dobrana instalacja fotowoltaiczna to rozwiązanie, które pozwala wygenerować spore oszczędności w skali roku.

Chciałbym porozmawiać z Państwem o tego typu rozwiązaniu, a także przedstawić wstępne kalkulacje.

Czy są Państwo zainteresowani?

Pozdrawiam,
Dorian Kwiatkowski



Information forwarded to [email protected], Debian Apache Maintainers <[email protected]>:
Bug#607755; Package apache2-suexec-custom. (Wed, 13 Oct 2021 08:03:03 GMT) (full text, mbox, link).


Acknowledgement sent to "Patryk Górecki" <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <[email protected]>. (Wed, 13 Oct 2021 08:03:03 GMT) (full text, mbox, link).


Message #53 received at [email protected] (full text, mbox, reply):

From: "Patryk Górecki" <[email protected]>
To: <[email protected]>
Subject: Ruch z pierwszej pozycji w Google
Date: Wed, 13 Oct 2021 07:51:19 GMT
Dzień dobry, 

jakiś czas temu zgłosiła się do nas firma, której strona internetowa nie pozycjonowała się wysoko w wyszukiwarce Google. 

Na podstawie wykonanego przez nas audytu SEO zoptymalizowaliśmy treści na stronie pod kątem wcześniej opracowanych słów kluczowych. Nasz wewnętrzny system codziennie analizuje prawidłowe działanie witryny.  Dzięki indywidualnej strategii, firma zdobywa coraz więcej Klientów.  

Czy chcieliby Państwo zwiększyć liczbę osób odwiedzających stronę internetową firmy? Mógłbym przedstawić ofertę? 


Pozdrawiam serdecznie,
Patryk Górecki



Information forwarded to [email protected], Debian Apache Maintainers <[email protected]>:
Bug#607755; Package apache2-suexec-custom. (Tue, 19 Oct 2021 08:03:08 GMT) (full text, mbox, link).


Acknowledgement sent to "Patryk Górecki" <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <[email protected]>. (Tue, 19 Oct 2021 08:03:08 GMT) (full text, mbox, link).


Message #58 received at [email protected] (full text, mbox, reply):

From: "Patryk Górecki" <[email protected]>
To: <[email protected]>
Subject: Ruch z pierwszej pozycji w Google
Date: Tue, 19 Oct 2021 08:00:49 GMT
Dzień dobry, 

jakiś czas temu zgłosiła się do nas firma, której strona internetowa nie pozycjonowała się wysoko w wyszukiwarce Google. 

Na podstawie wykonanego przez nas audytu SEO zoptymalizowaliśmy treści na stronie pod kątem wcześniej opracowanych słów kluczowych. Nasz wewnętrzny system codziennie analizuje prawidłowe działanie witryny.  Dzięki indywidualnej strategii, firma zdobywa coraz więcej Klientów.  

Czy chcieliby Państwo zwiększyć liczbę osób odwiedzających stronę internetową firmy? Mógłbym przedstawić ofertę? 


Pozdrawiam serdecznie,
Patryk Górecki



Information forwarded to [email protected], Debian Apache Maintainers <[email protected]>:
Bug#607755; Package apache2-suexec-custom. (Mon, 25 Oct 2021 07:54:03 GMT) (full text, mbox, link).


Acknowledgement sent to "Patryk Górecki" <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <[email protected]>. (Mon, 25 Oct 2021 07:54:03 GMT) (full text, mbox, link).


Message #63 received at [email protected] (full text, mbox, reply):

From: "Patryk Górecki" <[email protected]>
To: <[email protected]>
Subject: Ruch z pierwszej pozycji w Google
Date: Mon, 25 Oct 2021 07:50:27 GMT
Dzień dobry, 

jakiś czas temu zgłosiła się do nas firma, której strona internetowa nie pozycjonowała się wysoko w wyszukiwarce Google. 

Na podstawie wykonanego przez nas audytu SEO zoptymalizowaliśmy treści na stronie pod kątem wcześniej opracowanych słów kluczowych. Nasz wewnętrzny system codziennie analizuje prawidłowe działanie witryny.  Dzięki indywidualnej strategii, firma zdobywa coraz więcej Klientów.  

Czy chcieliby Państwo zwiększyć liczbę osób odwiedzających stronę internetową firmy? Mógłbym przedstawić ofertę? 


Pozdrawiam serdecznie,
Patryk Górecki



Information forwarded to [email protected], Debian Apache Maintainers <[email protected]>:
Bug#607755; Package apache2-suexec-custom. (Fri, 29 Oct 2021 07:51:04 GMT) (full text, mbox, link).


Acknowledgement sent to "Patryk Górecki" <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <[email protected]>. (Fri, 29 Oct 2021 07:51:04 GMT) (full text, mbox, link).


Message #68 received at [email protected] (full text, mbox, reply):

From: "Patryk Górecki" <[email protected]>
To: <[email protected]>
Subject: Ruch z pierwszej pozycji w Google
Date: Fri, 29 Oct 2021 07:46:07 GMT
Dzień dobry, 

jakiś czas temu zgłosiła się do nas firma, której strona internetowa nie pozycjonowała się wysoko w wyszukiwarce Google. 

Na podstawie wykonanego przez nas audytu SEO zoptymalizowaliśmy treści na stronie pod kątem wcześniej opracowanych słów kluczowych. Nasz wewnętrzny system codziennie analizuje prawidłowe działanie witryny.  Dzięki indywidualnej strategii, firma zdobywa coraz więcej Klientów.  

Czy chcieliby Państwo zwiększyć liczbę osób odwiedzających stronę internetową firmy? Mógłbym przedstawić ofertę? 


Pozdrawiam serdecznie,
Patryk Górecki



Information forwarded to [email protected], Debian Apache Maintainers <[email protected]>:
Bug#607755; Package apache2-suexec-custom. (Fri, 12 Nov 2021 08:54:10 GMT) (full text, mbox, link).


Acknowledgement sent to "Dawid Rowicki" <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <[email protected]>. (Fri, 12 Nov 2021 08:54:11 GMT) (full text, mbox, link).


Message #73 received at [email protected] (full text, mbox, reply):

From: "Dawid Rowicki" <[email protected]>
To: <[email protected]>
Subject: Prezentacja
Date: Fri, 12 Nov 2021 08:45:54 GMT
Dzień dobry!

Czy mógłbym przedstawić rozwiązanie, które umożliwia monitoring każdego auta w czasie rzeczywistym w tym jego pozycję, zużycie paliwa i przebieg?

Dodatkowo nasze narzędzie minimalizuje koszty utrzymania samochodów, skraca czas przejazdów, a także tworzenie planu tras czy dostaw.

Z naszej wiedzy i doświadczenia korzysta już ponad 49 tys. Klientów. Monitorujemy 809 000 pojazdów na całym świecie, co jest naszą najlepszą wizytówką.

Bardzo proszę o e-maila zwrotnego, jeśli moglibyśmy wspólnie omówić potencjał wykorzystania takiego rozwiązania w Państwa firmie.


Z poważaniem,
Dawid Rowicki



Information forwarded to [email protected], Debian Apache Maintainers <[email protected]>:
Bug#607755; Package apache2-suexec-custom. (Mon, 13 Dec 2021 09:03:05 GMT) (full text, mbox, link).


Acknowledgement sent to "Adam Furgalski" <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <[email protected]>. (Mon, 13 Dec 2021 09:03:05 GMT) (full text, mbox, link).


Message #78 received at [email protected] (full text, mbox, reply):

From: "Adam Furgalski" <[email protected]>
To: <[email protected]>
Subject: Słowa kluczowe do wypozycjonowania
Date: Mon, 13 Dec 2021 08:51:06 GMT
Dzień dobry,

zapoznałem się z Państwa ofertą i z przyjemnością przyznaję, że przyciąga uwagę i zachęca do dalszych rozmów. 

Pomyślałem, że może mógłbym mieć swój wkład w Państwa rozwój i pomóc dotrzeć z tą ofertą do większego grona odbiorców. Pozycjonuję strony www, dzięki czemu generują świetny ruch w sieci.

Możemy porozmawiać w najbliższym czasie?


Pozdrawiam
Adam Furgalski



Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Sun Sep 22 09:40:16 2024; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.