The apprentice_load function in libmagic/apprentice.c in the Fileinfo component in PHP through 5.6.4 attempts to perform a free operation on a stack-based character array, which allows remote attackers to cause a denial of service (memory corruption or application crash) or possibly have unspecified other impact via unknown vectors. NOTE: this is disputed by the vendor because the standard erealloc behavior makes the free operation unreachable.

PHP is vulnerable to a denial of service, caused by an invalid free operation on the stack-based array in the libmagic/apprentice.c file. A remote attacker could exploit this vulnerability to cause a denial of service or other unexpected impacts.