Navigation Menu

Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
Fix bug #78599 (env_path_info underflow can lead to RCE) (CVE-2019-11043
Browse files Browse the repository at this point in the history
)

cheery-picked from ab061f9
without the test as tester not available
  • Loading branch information
bukka authored and remicollet committed Oct 22, 2019
1 parent b85766d commit c69bcb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sapi/fpm/fpm/fpm_main.c
Expand Up @@ -1245,8 +1245,8 @@ static void init_request_info(TSRMLS_D)
path_info = script_path_translated + ptlen;
tflag = (slen != 0 && (!orig_path_info || strcmp(orig_path_info, path_info) != 0));
} else {
path_info = env_path_info ? env_path_info + pilen - slen : NULL;
tflag = (orig_path_info != path_info);
path_info = (env_path_info && pilen > slen) ? env_path_info + pilen - slen : NULL;
tflag = path_info && (orig_path_info != path_info);
}

if (tflag) {
Expand Down

0 comments on commit c69bcb2

Please sign in to comment.