vulnerability bulletin 12183
PHP: buffer overflow via PDO
Synthesis of the vulnerability
An attacker who owns a database used by a PHP application which uses PDO, can send malicious error codes and error messages in order to corrupt the memory.Impacted products:
MES, Mandriva Linux, PHP.
63235, MDVA-2012:068, VIGILANCE-VUL-12183.
Description of the vulnerability
The PDO (PHP Data Objects) extension can be used to prepare SQL queries, in order to optimize their processing time.
The routine pdo_odbc_error defined in the source file ext/pdo_odbc/odbc_driver.c uses two local buffers, used to store C strings. However, the buffer size does not take into account the terminating zero. Wen the database server sends an error code, this code is copied into the buffer discard_state, which leads to a one byte overflow.
A second buffer in the same routine, discard_buf, is used to store messages from the database server. The bug also applies to this buffer.
An attacker who owns a database used by a PHP application which uses PDO, can send malicious error codes and error messages in order to corrupt the memory.Complete Vigil@nce bulletin....
Share this bulletin
Computer vulnerabilities tracking service
Vigil@nce provides applications vulnerabilities announces
. The Vigil@nce vulnerability database contains several thousand vulnerabilities. The technology watch team tracks security threats targeting the computer system. The Vigil@nce security watch publishes vulnerability bulletins about threats impacting the information system.