cdf_read_property_info in cdf.c in file through 5.37 does not restrict the number of CDF_VECTOR elements, which allows a heap-based buffer overflow (4-byte out-of-bounds write).
CWE-787 Out-of-bounds Write
CVSSv2:
Base Score: MEDIUM (6.8)
Vector: /AV:N/AC:M/Au:N/C:P/I:P/A:P
CVSSv3:
Base Score: HIGH (7.8)
Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
readelf.c in file before 5.22, as used in the Fileinfo component in PHP before 5.4.37, 5.5.x before 5.5.21, and 5.6.x before 5.6.5, does not consider that pread calls sometimes read only a subset of the available data, which allows remote attackers to cause a denial of service (uninitialized memory access) or possibly have unspecified other impact via a crafted ELF file.
CWE-20 Improper Input Validation
CVSSv2:
Base Score: HIGH (7.5)
Vector: /AV:N/AC:L/Au:N/C:P/I:P/A:P
References:
BID - [72516](http://www.securityfocus.com/bid/72516)
CONFIRM - http://bugs.gw.com/view.php?id=409
CONFIRM - http://php.net/ChangeLog-5.php
CONFIRM - http://www.oracle.com/technetwork/topics/security/bulletinjul2015-2511963.html
CONFIRM - http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html
CONFIRM - http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html
CONFIRM - https://github.com/file/file/commit/445c8fb0ebff85195be94cd9f7e1df89cade5c7f
DEBIAN - [DSA-3196](http://www.debian.org/security/2015/dsa-3196)
GENTOO - [GLSA-201701-42](https://security.gentoo.org/glsa/201701-42)
HP - [HPSBMU03380](http://marc.info/?l=bugtraq&m=143748090628601&w=2)
HP - [HPSBMU03409](http://marc.info/?l=bugtraq&m=144050155601375&w=2)
MLIST - [[file] 20141216 [PATCH] readelf.c: better checks for values returned by pread](http://mx.gw.com/pipermail/file/2014/001649.html)
MLIST - [[oss-security] 20150205 Re: CVE Request: PHP/file: out-of-bounds memory access in softmagic](http://openwall.com/lists/oss-security/2015/02/05/13)
REDHAT - [RHSA-2016:0760](http://rhn.redhat.com/errata/RHSA-2016-0760.html)
UBUNTU - [USN-3686-1](https://usn.ubuntu.com/3686-1/)
[cpe:2.3:a:file_project:file:*:*:*:*:*:*:*:* versions up to (including) 5.21](https://web.nvd.nist.gov/view/vuln/search-results?adv_search=true&cves=on&cpe_version=cpe%3A%2Fa%3Afile_project%3Afile)
...
softmagic.c in file before 5.21 does not properly limit recursion, which allows remote attackers to cause a denial of service (CPU consumption or crash) via unspecified vectors.
CWE-399 Resource Management Errors
CVSSv2:
Base Score: MEDIUM (5.0)
Vector: /AV:N/AC:L/Au:N/C:N/I:N/A:P
[cpe:2.3:a:file_project:file:*:*:*:*:*:*:*:* versions up to (including) 5.20](https://web.nvd.nist.gov/view/vuln/search-results?adv_search=true&cves=on&cpe_version=cpe%3A%2Fa%3Afile_project%3Afile)
The mconvert function in softmagic.c in file before 5.21, as used in the Fileinfo component in PHP before 5.4.37, 5.5.x before 5.5.21, and 5.6.x before 5.6.5, does not properly handle a certain string-length field during a copy of a truncated version of a Pascal string, which might allow remote attackers to cause a denial of service (out-of-bounds memory access and application crash) via a crafted file.
CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer
CVSSv2:
Base Score: MEDIUM (5.0)
Vector: /AV:N/AC:L/Au:N/C:N/I:N/A:P
softmagic.c in file before 5.17 and libmagic allows context-dependent attackers to cause a denial of service (out-of-bounds memory access and crash) via crafted offsets in the softmagic of a PE executable.
CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer
CVSSv2:
Base Score: MEDIUM (4.3)
Vector: /AV:N/AC:M/Au:N/C:N/I:N/A:P
References:
CONFIRM - http://bugs.gw.com/view.php?id=313
CONFIRM - http://support.apple.com/kb/HT6443
CONFIRM - http://www.php.net/ChangeLog-5.php
CONFIRM - https://github.com/file/file/commit/447558595a3650db2886cd2f416ad0beba965801
DEBIAN - [DSA-2873](http://www.debian.org/security/2014/dsa-2873)
GENTOO - [GLSA-201503-08](https://security.gentoo.org/glsa/201503-08)
MLIST - [[oss-security] 20140303 CVE Request: file: crashes when checking softmagic for some corrupt PE executables](http://seclists.org/oss-sec/2014/q1/473)
MLIST - [[oss-security] 20140305 Re: CVE Request: file: crashes when checking softmagic for some corrupt PE executables](http://seclists.org/oss-sec/2014/q1/504)
MLIST - [[oss-security] 20140305 Re: CVE Request: file: crashes when checking softmagic for some corrupt PE executables](http://seclists.org/oss-sec/2014/q1/505)
REDHAT - [RHSA-2014:1765](http://rhn.redhat.com/errata/RHSA-2014-1765.html)
SUSE - [openSUSE-SU-2014:0364](http://lists.opensuse.org/opensuse-updates/2014-03/msg00034.html)
SUSE - [openSUSE-SU-2014:0367](http://lists.opensuse.org/opensuse-updates/2014-03/msg00037.html)
SUSE - [openSUSE-SU-2014:0435](http://lists.opensuse.org/opensuse-updates/2014-03/msg00084.html)
UBUNTU - [USN-2162-1](http://www.ubuntu.com/usn/USN-2162-1)
UBUNTU - [USN-2163-1](http://www.ubuntu.com/usn/USN-2163-1)
[cpe:2.3:a:file_project:file:*:*:*:*:*:*:*:* versions up to (excluding) 5.17](https://web.nvd.nist.gov/view/vuln/search-results?adv_search=true&cves=on&cpe_version=cpe%3A%2Fa%3Afile_project%3Afile)
...
The cdf_check_stream_offset function in cdf.c in file before 5.19, as used in the Fileinfo component in PHP before 5.4.30 and 5.5.x before 5.5.14, relies on incorrect sector-size data, which allows remote attackers to cause a denial of service (application crash) via a crafted stream offset in a CDF file.
NVD-CWE-noinfo
CVSSv2:
Base Score: MEDIUM (4.3)
Vector: /AV:N/AC:M/Au:N/C:N/I:N/A:P
The cdf_count_chain function in cdf.c in file before 5.19, as used in the Fileinfo component in PHP before 5.4.30 and 5.5.x before 5.5.14, does not properly validate sector-count data, which allows remote attackers to cause a denial of service (application crash) via a crafted CDF file.
NVD-CWE-noinfo
CVSSv2:
Base Score: MEDIUM (4.3)
Vector: /AV:N/AC:M/Au:N/C:N/I:N/A:P
The cdf_read_property_info function in file before 5.19, as used in the Fileinfo component in PHP before 5.4.30 and 5.5.x before 5.5.14, does not properly validate a stream offset, which allows remote attackers to cause a denial of service (application crash) via a crafted CDF file.
CWE-20 Improper Input Validation
CVSSv2:
Base Score: MEDIUM (4.3)
Vector: /AV:N/AC:M/Au:N/C:N/I:N/A:P
This appears to be a false positive. The vulnerability is in the file utility which is a command line tool for guessing file types, similar to the purpose of this library - but we do not use it internally.
CVE-2019-18218
cdf_read_property_info in cdf.c in file through 5.37 does not restrict the number of CDF_VECTOR elements, which allows a heap-based buffer overflow (4-byte out-of-bounds write).
CWE-787 Out-of-bounds Write
CVSSv2:
CVSSv3:
References:
CVE-2014-9653
readelf.c in file before 5.22, as used in the Fileinfo component in PHP before 5.4.37, 5.5.x before 5.5.21, and 5.6.x before 5.6.5, does not consider that pread calls sometimes read only a subset of the available data, which allows remote attackers to cause a denial of service (uninitialized memory access) or possibly have unspecified other impact via a crafted ELF file.
CWE-20 Improper Input Validation
CVSSv2:
References:
CVE-2014-8117
softmagic.c in file before 5.21 does not properly limit recursion, which allows remote attackers to cause a denial of service (CPU consumption or crash) via unspecified vectors.
CWE-399 Resource Management Errors
CVSSv2:
References:
Vulnerable Software & Versions:
CVE-2014-9652
The mconvert function in softmagic.c in file before 5.21, as used in the Fileinfo component in PHP before 5.4.37, 5.5.x before 5.5.21, and 5.6.x before 5.6.5, does not properly handle a certain string-length field during a copy of a truncated version of a Pascal string, which might allow remote attackers to cause a denial of service (out-of-bounds memory access and application crash) via a crafted file.
CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer
CVSSv2:
References:
CVE-2014-2270
softmagic.c in file before 5.17 and libmagic allows context-dependent attackers to cause a denial of service (out-of-bounds memory access and crash) via crafted offsets in the softmagic of a PE executable.
CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer
CVSSv2:
References:
CVE-2014-3479
The cdf_check_stream_offset function in cdf.c in file before 5.19, as used in the Fileinfo component in PHP before 5.4.30 and 5.5.x before 5.5.14, relies on incorrect sector-size data, which allows remote attackers to cause a denial of service (application crash) via a crafted stream offset in a CDF file.
NVD-CWE-noinfo
CVSSv2:
References:
CVE-2014-3480
The cdf_count_chain function in cdf.c in file before 5.19, as used in the Fileinfo component in PHP before 5.4.30 and 5.5.x before 5.5.14, does not properly validate sector-count data, which allows remote attackers to cause a denial of service (application crash) via a crafted CDF file.
NVD-CWE-noinfo
CVSSv2:
References:
CVE-2014-3487
The cdf_read_property_info function in file before 5.19, as used in the Fileinfo component in PHP before 5.4.30 and 5.5.x before 5.5.14, does not properly validate a stream offset, which allows remote attackers to cause a denial of service (application crash) via a crafted CDF file.
CWE-20 Improper Input Validation
CVSSv2:
References: