CVE-2013-7345

NameCVE-2013-7345
DescriptionThe BEGIN regular expression in the awk script detector in magic/Magdir/commands in file before 5.15 uses multiple wildcards with unlimited repetitions, which allows context-dependent attackers to cause a denial of service (CPU consumption) via a crafted ASCII file that triggers a large amount of backtracking, as demonstrated via a file with many newline characters.
SourceCVE (at NVD; oss-sec, fulldisc, OSVDB, EDB, Metasploit, Red Hat, Ubuntu, Gentoo, SuSE, Mageia, more)
ReferencesDSA-2873-1, DSA-3064-1
NVD severitymedium (attack range: remote)
Debian Bugs703993
Debian/oldoldstablenot vulnerable.
Debian/oldstablenot vulnerable.
Debian/stablenot vulnerable.
Debian/testingnot vulnerable.
Debian/unstablenot vulnerable.

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
file (PTS)squeeze, squeeze (security)5.04-5+squeeze5fixed
squeeze (lts)5.04-5+squeeze10fixed
wheezy (security), wheezy5.11-2+deb7u8fixed
stretch, sid, jessie1:5.22+15-2fixed
php5 (PTS)squeeze, squeeze (security)5.3.3-7+squeeze19fixed
squeeze (lts)5.3.3.1-7+squeeze26fixed
wheezy (security), wheezy5.4.44-0+deb7u1fixed
jessie5.6.7+dfsg-1fixed
jessie (security)5.6.12+dfsg-0+deb8u1fixed
stretch5.6.11+dfsg-1fixed
sid5.6.12+dfsg-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
filesource(unstable)1:5.17-0.1medium703993
filesourcesqueeze5.04-5+squeeze4mediumDSA-2873-1
filesourcewheezy5.11-2+deb7u2mediumDSA-2873-1
php5source(unstable)5.6.0+dfsg-1medium
php5sourcesqueeze(not affected)
php5sourcewheezy5.4.34-0+deb7u1mediumDSA-3064-1

Notes

http://bugs.gw.com/view.php?id=164
fixed in commit ef2329cf71acb59204dd981e2c6cce6c81fe467c
[squeeze] - php5 <not-affected> (Vulnerable code not present)
Wheezy's php5 is vulnerable in 5.4.4-14+deb7u14. Verified by rebuilding
magic.mgc out of ext/fileinfo/data_info.c and "strings magic.mgc |grep BEGIN"
returns "^\s*BEGIN\s*[{]". Same test in squeeze does not
report the problematic string.
Good fix is to regenerate the file with "php5
create_data_file.php /usr/share/file/magic.mgc > data_info.c" once
you have a fixed libmagic1 installed.
fixed by php5 5.4.27 so DSA 3064-1 also fixed it in Wheezy

Search for package or bug name: Reporting problems