[php-src] PR #14364: Improve randomness of uploaded file names and files created by tempnam()

From: Date: Wed, 29 May 2024 17:41:02 +0000
Subject: [php-src] PR #14364: Improve randomness of uploaded file names and files created by tempnam()
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-26375@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/14364 Author: arnaud-lb Uploaded files are created with a name in the form /tmp/phpXXXXXX, where XXXXXX can take one of 62^6 different values. According to [this blogpost](https://swarm.ptsecurity.com/exploiting-arbitrary-object-instantiations/), it is possible to guess this name by brute forcing, with a reasonable number of attempts. This can be used to exploit a vulnerable applications. Here I add 4-8 bytes of additional randomness before the XXXXXX pattern, to make this attack unpractical. The change also applies to tempnam().

« previous php.git-pulls (#26375) next »