oriolrius.cat

Des del 2000 compartiendo sobre…

PHP: bug fins la versio 4.0.2

Reading time: 2 – 2 minutes

Avui llegint les noticies de securityfocus he vist q s’ha trobat un bug al
php fins la versió 4.0.2, la 4.0.3 ja ho té resolt. De fet, si
llegim d’on ve el bug aquest és obvi, ja que aprofita una funció
del PHP q permet usar el syslog així doncs si tenim en compte q
gairebé tots els dimonis dels unix estan afectats pel errors dels string
l’únic q es tracta és d’aprofitar aixó per tal d’obtenir
execusió arbitraria de codi, o root remot.

La explicació tècnica de securityfocus és la
següent:
The vulnerability exists in the code that handles error logging and is present
if error logging is enabled in the “php.ini” configuration file. When errors
are encountered by PHP, a string containing data supplied by the user is passed
as the format string argument (the log_message variable) to the php_syslog()
function (which contains *printf functions). As a result, it is possible for a
malicious user to craft a string containing malicious format specifiers that
will be passed to the php_syslog function as part of an error message. When
interpreted by the *printf functions, these specifiers can cause the process to
overwrite its own stack variables with arbitrary data. This can lead to remote
access being gained on the target host with privileges of the webserver for the
attacker.
Error logging may or may not be enabled by default on systems shipped with
PHP.

Per tal d’evitar aquest error es pot deshabilitar al php.ini la
opció:
“log_errors = Off”
O instal.lar-se el PHP 4.0.3 q va sortir ahir.
Per més informació sobre el tema:
http://www.securityfocus.com/bid/1786

3 thoughts on “PHP: bug fins la versio 4.0.2

  1. Ja he intal.lat el PHP v4.0.3 i el Zend Optimizer v0.99, aquest últim en
    teoria optimitza des d’un 40% a 100% la velocitat de procés del motor
    del PHP, ja vuere si es veritat, per comprovar q esta instal.lat amb
    oriol.homeip.net/test.php.
    Per més informació del Zend: http://www.zend.com
    Per instal.lar-lo és molt fàcil només s’ha de copiar el
    fitxer ZendOptimizer.so q porta el fitxer q ens podem baixar del site al
    directori /usr/local/Zend/lib i després s’han d’afegir les següents
    línies al /usr/local/lib/php.ini
    zend_optimizer.optimization_level=15
    zend_extension=”/usr/local/Zend/lib/ZendOptimizer.so”

Últimas entradas

Resumen 2023

Reading time: 14 – 22 minutes El 2023 comenzó con una sensación de renovación y optimismo. Tras un período marcado por la pandemia, este año se presentó como un lienzo en blanco, lleno de posibilidades y nuevas experiencias. Aunque el

Leer más »
Archivo