Apache optionbleed

Rund um die Sicherheit des Systems und die Applikationen
Post Reply
ddm3ve
Moderator
Moderator
Posts: 1237
Joined: 2011-07-04 10:56
 

Apache optionbleed

Post by ddm3ve »

Hi,

https://www.golem.de/news/optionsbleed- ... 105-2.html

genügt es hier nur die HTTP Methode OPTIONS zu deaktivieren, oder wie kann man sich effektiv vor der Lücke schützen?
02:32:12 21.12.2012 und dann sind Deine Probleme alle unwichtig.
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Apache optionbleed

Post by Joe User »

Kein Grund zur Panik!

Man muss den Apache hierzu absichtlich kaputt konfigurieren und das macht ja kein verantwortungsvoller Admin der die Dokumentation gelesen hat.

Und Shared-Hosting sollte ebenfalls kein Problem sein, denn dortige Admins sind selbstverständlich ebenfalls verantwortungsvoll und haben die entsprechenden Optionen bei ihren Kunden beschränkt beziehungsweise deaktiviert.

Es gibt mehrere Möglichkeiten diesen Bug zu vermeiden:
1.) Kein <Limit ...> mit nicht existierenden OPTIONS verwenden
2.) OPTIONS per AllowMethods (allowmethods_module) deaktivieren
3.) <Limit ...> per AllowOverride oder AllowOverrideList deaktivieren
4.) Patch einspielen, notfalls manuell direkt aus dem Apache-SVN
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
ddm3ve
Moderator
Moderator
Posts: 1237
Joined: 2011-07-04 10:56
 

Re: Apache optionbleed

Post by ddm3ve »

Sprich eine solche Konfiguration sollte schon helfen?

RewriteEngine on
RewriteCond %{THE_REQUEST} !^(POST|GET|PATCH|DELETE)\ /.*\ HTTP/1\.1$
RewriteRule .* - [F]
02:32:12 21.12.2012 und dann sind Deine Probleme alle unwichtig.
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Apache optionbleed

Post by Joe User »

Nein, das hilft nicht.
In der Hauptkonfiguration (nicht im VirtualHost) zum Beispiel so:

Code: Select all

LoadModule allowmethods_module libexec/apache24/mod_allowmethods.so
<Directory "/">
    <IfModule allowmethods_module>
        AllowMethods GET POST
    </IfModule>
    Options None +FollowSymLinks
    AllowOverride None
    Require all denied
</Directory>
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Apache optionbleed

Post by Joe User »

Patch für Apache-2.4.27

Code: Select all

[root@devgate:~] # cat /usr/ports/www/apache24/files/patch-CVE-2017-9798
--- server/core.c       2017/08/16 16:50:29     1805223
+++ server/core.c       2017/09/08 13:13:11     1807754
@@ -2266,6 +2266,12 @@
             /* method has not been registered yet, but resource restriction
              * is always checked before method handling, so register it.
              */
+            if (cmd->pool == cmd->temp_pool) {
+                /* In .htaccess, we can't globally register new methods. */
+                return apr_psprintf(cmd->pool, "Could not register method '%s' "
+                                   "for %s from .htaccess configuration",
+                                    method, cmd->cmd->name);
+            }
             methnum = ap_method_register(cmd->pool,
                                          apr_pstrdup(cmd->pool, method));
         }
Alle halbwegs brauchbaren Distros und BSDs haben mitlerweile aktualisierte Pakete oder Patches bereitgestellt.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
ddm3ve
Moderator
Moderator
Posts: 1237
Joined: 2011-07-04 10:56
 

Re: Apache optionbleed

Post by ddm3ve »

Ja, ist bekannt.
Mich hat an der Stelle lediglich interessiert, wie man es alternativ vermeiden kann.
Schließlich gibt es manchmal einfach nicht die Möglichkeit sowas gleich zu testen und auf prod auszurollen.

Vielen Dank für die Information schon mal.
02:32:12 21.12.2012 und dann sind Deine Probleme alle unwichtig.
Post Reply