Name | CVE-2013-7345 |
Description | The 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. |
Source | CVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
References | DSA-2873-1, DSA-3064-1 |
Debian Bugs | 703993 |
Vulnerable and fixed packages
The table below lists information on source packages.
Source Package | Release | Version | Status |
---|
file (PTS) | jessie, jessie (lts) | 1:5.22+15-2+deb8u7 | fixed |
| stretch (security), stretch (lts), stretch | 1:5.30-1+deb9u3 | fixed |
| buster | 1:5.35-4+deb10u2 | fixed |
| buster (security), buster (lts) | 1:5.35-4+deb10u1 | fixed |
| bullseye (security), bullseye | 1:5.39-3+deb11u1 | fixed |
| bookworm | 1:5.44-3 | fixed |
| sid, trixie | 1:5.45-3 | fixed |
php5 (PTS) | jessie, jessie (lts) | 5.6.40+dfsg-0+deb8u21 | fixed |
The information below is based on the following data on fixed versions.
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