Vigil@nce: Perl, memory corruption via GLOB_ALTDIRFUNC
October 2011 by Vigil@nce
This bulletin was written by Vigil@nce : http://vigilance.fr/offer
SYNTHESIS OF THE VULNERABILITY
When an attacker can transmit a flag to the Perl
File::Glob::bsd_glob() function, he can corrupt the memory, in
order to create a denial of service or to execute code.
– Severity: 2/4
– Creation date: 29/09/2011
IMPACTED PRODUCTS
– Unix - plateform
DESCRIPTION OF THE VULNERABILITY
The Perl File::Glob::bsd_glob() function uses the C glob()
function of the g/libc, in order to obtain the list of files :
glob("*.txt", OPTIONS, etc.);
The C glob() function uses a "glob_t" structure to store state
information for the GLOB_ALTDIRFUNC option. However, the Perl
interface cannot initialize this structure. So, when the
GLOB_ALTDIRFUNC option is used in File::Glob::bsd_glob(), a memory
corruption occurs in glob().
When an attacker can transmit a flag to the Perl
File::Glob::bsd_glob() function, he can therefore corrupt the
memory, in order to create a denial of service or to execute code.
ACCESS TO THE COMPLETE VIGIL@NCE BULLETIN
http://vigilance.fr/vulnerability/Perl-memory-corruption-via-GLOB-ALTDIRFUNC-11027