Protect yourself against future threats.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 =========================================================================== AUSCERT External Security Bulletin Redistribution ESB-2012.0056 Hash DOS attack prevention with Suhosin needs a .htaccess edit 12 January 2012 =========================================================================== AusCERT Security Bulletin Summary --------------------------------- Product: Drupal Publisher: Drupal Operating System: Windows UNIX variants (UNIX, Linux, OSX) Impact/Access: Denial of Service -- Remote/Unauthenticated Resolution: Patch/Upgrade CVE Names: CVE-2011-4885 Reference: ESB-2012.0054 ESB-2012.0012 - --------------------------BEGIN INCLUDED TEXT-------------------- * Advisory ID: DRUPAL-PSA-2012-001 * Project: Drupal core [1] * Version: 6.x, 7.x * Date: 2012-01-11 * Security risk: Less critical [2] * Exploitable from: Remote * Vulnerability: Denial of Service - -------- DESCRIPTION --------------------------------------------------------- PHP is vulnerable to a hash collision denial of service (DOS) [3] attack. If an attacker can post a large amount of specifically chosen variables to the site, a large amount of CPU time is consumed preventing service to visitors. Many users deploy the Suhosin PHP extension [4] to limit the amount of posted variables that will be handled by PHP, thus preventing the DOS attack. There's an unfortunate interaction with the mbstring extension required by Drupal to work with UTF-8. When the setting mbstring.encoding_translation is updated via .htaccess the mbstring extension changes the PHP POST handlers so that only every other POST variable can be handled by Suhosin. While Suhosin will still remove half of the variables over the post.max_vars limit, it is ultimately unsuccesful in limiting the amount of posted variables and thus in preventing the hash collision DOS attack. - -------- VERSIONS AFFECTED --------------------------------------------------- All versions - -------- SOLUTION ------------------------------------------------------------ Confirm that the master value of mbstring.encoding_translation is set to Off via: * Drupal 7: Reports > Status, then More information on the PHP version (admin/reports/status/php) * Drupal 6: Administer > Reports > Status report, then follow the link on the PHP version (admin/reports/status/php) Next, remove the lines from the file .htaccess in the Drupal root. For Drupal 7.x remove the lines: php_flag mbstring.encoding_translation off For Drupal 6.x remove the lines: php_value mbstring.encoding_translation off If the master value of mbstring.encoding_translation is On, change it to Off via PHP.ini. Contact your hosting provider if necessary. If you do not use Suhosin, limit the amount of variables posted to your site in another way. You should consider upgrading to PHP 5.3.9 and using its newly introduced directive 'max_input_vars'. Please note that setting such limits too low (whether via Suhosin or PHP) can break processing on long forms like the permissions administration screen. It is likely that the near-future will see an update to Suhosin, making the procedure described in this PSA unnecessary. See also the Drupal core [5] project page. - -------- REPORTED BY --------------------------------------------------------- * Dominic Böttger - -------- CONTACT AND MORE INFORMATION ---------------------------------------- The Drupal security team can be reached at security at drupal.org or via the contact form at http://drupal.org/contact [6]. Learn more about the Drupal Security team and their policies [7], writing secure code for Drupal [8], and securing your site [9]. [1] http://drupal.org/project/drupal [2] http://drupal.org/security-team/risk-levels [3] http://www.ocert.org/advisories/ocert-2011-003.html [4] http://www.hardened-php.net/ [5] http://drupal.org/project/drupal [6] http://drupal.org/contact [7] http://drupal.org/security-team [8] http://drupal.org/writing-secure-code [9] http://drupal.org/security/secure-configuration - --------------------------END INCLUDED TEXT-------------------- You have received this e-mail bulletin as a result of your organisation's registration with AusCERT. The mailing list you are subscribed to is maintained within your organisation, so if you do not wish to continue receiving these bulletins you should contact your local IT manager. If you do not know who that is, please send an email to auscert@auscert.org.au and we will forward your request to the appropriate person. NOTE: Third Party Rights This security bulletin is provided as a service to AusCERT's members. As AusCERT did not write the document quoted above, AusCERT has had no control over its content. The decision to follow or act on information or advice contained in this security bulletin is the responsibility of each user or organisation, and should be considered in accordance with your organisation's site policies and procedures. AusCERT takes no responsibility for consequences which may arise from following or acting on information or advice contained in this security bulletin. NOTE: This is only the original release of the security bulletin. It may not be updated when updates to the original are made. If downloading at a later date, it is recommended that the bulletin is retrieved directly from the author's website to ensure that the information is still current. Contact information for the authors of the original document is included in the Security Bulletin above. If you have any questions or need further information, please contact them directly. Previous advisories and external security bulletins can be retrieved from: http://www.auscert.org.au/render.html?cid=1980 =========================================================================== Australian Computer Emergency Response Team The University of Queensland Brisbane Qld 4072 Internet Email: auscert@auscert.org.au Facsimile: (07) 3365 7031 Telephone: (07) 3365 4417 (International: +61 7 3365 4417) AusCERT personnel answer during Queensland business hours which are GMT+10:00 (AEST). On call after hours for member emergencies only. =========================================================================== -----BEGIN PGP SIGNATURE----- Comment: http://www.auscert.org.au/render.html?it=1967 iQIVAwUBTw5el+4yVqjM2NGpAQIaiA/9HFF21ezofsNsHEjRb1Bnd7zQbKSdAkEs /sBRZ3sgXqn4id/vl0Q3slPKYII2+rktkhXM0+2Poi3oaxQIFh57Cvt2d90gbU+g S5gak0DnUECzPObsxM6qKPVXqyVU83ykIQ6KvEuYAed2ut5huXsGiiyrVcD3J02S rcxSa4bJRvVMkZjJuOZJ772bJlqJATe/Z3jlPZXPhYRu8YgmrAjUqhSeHeX/D+w0 B9gnJtAh0hQTDFprxPvCDShSbl5oTQ1PpQzIJ/kh16D1+nUlGCeUeg2Xcb1d8GA+ mdWgqlrKtPmE3sq6p/k1Sph2hyJAaZbmjB943JWSx5NKwhTTRt/fIXXZu1SY5qFP ZDgC8UaTMQNJqX4OnT/5QSPRS9xsSG9y7BSTo16i/+YtK1arq1v4sf4ZUjiNd1Wf C57XF76hPqv8fnqJ8kGWczJe2jE9j8c0CSeK5MMkv/2WqhjGuvhKykJtiIP9g3Yw l8jrezIBgAu++4zAISwH9906Huhujl+SuvvykSstOkf424U0GhuijifiP/DpuJDU 6Bc9BeAi8EKoVnzJGV5MIzt8wMk7ufdzsKe0fArbV3VfigX9bFgtKZ1NqsfXXJTZ aXRzSksUHICtYHYLCsL97a9J1DBB8jTFI4AZZjATEUMn9TzOWH6XDy5Z8unT+XHF Nrryfq9s86M= =lVA5 -----END PGP SIGNATURE-----