php5.2.3远程CGI缓冲溢出漏洞
网站建设 2021-07-03 10:02www.dzhlxh.cn网站建设
php5.2.3在处理CGI的时候,由于一编程错误(缺少括号),错误计算一字符串长度,导致堆缓冲溢出,可能远程执行任意代码。
触发方式:配置.php到php.exe的CGI映射,请求GET /test.php/aa HTTP/1.1 错误发生在php-5.2.3\sapi\cgi\cgi-man.c line 886: int path_translated_len = ptlen env_path_info ? strlen(env_path_info) : 0; 程序应该是 int path_translated_len = ptlen (env_path_info ? strlen(env_path_info) : 0); 程序处理流程: main()
{
......
init_request_info(TSRMLS_C);
...... } static void init_request_info(TSRMLS_D)
{
......
int path_translated_len = ptlen env_path_info ? strlen(env_path_info) : 0;
......
path_translated = (char *) emalloc(path_translated_len 1);
......
if (env_path_info) {
memcpy(path_translated ptlen, env_path_info, path_translated_len - ptlen);
} }
触发方式:配置.php到php.exe的CGI映射,请求GET /test.php/aa HTTP/1.1 错误发生在php-5.2.3\sapi\cgi\cgi-man.c line 886: int path_translated_len = ptlen env_path_info ? strlen(env_path_info) : 0; 程序应该是 int path_translated_len = ptlen (env_path_info ? strlen(env_path_info) : 0); 程序处理流程: main()
{
......
init_request_info(TSRMLS_C);
...... } static void init_request_info(TSRMLS_D)
{
......
int path_translated_len = ptlen env_path_info ? strlen(env_path_info) : 0;
......
path_translated = (char *) emalloc(path_translated_len 1);
......
if (env_path_info) {
memcpy(path_translated ptlen, env_path_info, path_translated_len - ptlen);
} }
上一篇:BBSXP2008存在后台注射漏洞
下一篇:通过Dreamweaver挖掘脚本漏洞