CVE-2007-1536
published 2007-03-20CVE-2007-1536: Integer underflow in the file_printf function in the "file" program before 4.20 allows user-assisted attackers to execute arbitrary code via a file that…
PriorityP343critical9.3CVSS 2.0
AVNACMAuNCCICAC
EXPLOIT
EPSS
12.23%
95.7th percentile
Integer underflow in the file_printf function in the "file" program before 4.20 allows user-assisted attackers to execute arbitrary code via a file that triggers a heap-based buffer overflow.
Affected
12 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | file | < file 4.20-1 (bookworm) | file 4.20-1 (bookworm) |
| debian | file | < file 4.21-1 (bookworm) | file 4.21-1 (bookworm) |
| file | file | <= 4.19 | — |
| file | file | — | — |
| file_project | file | >= 0 < 4.21-1 | 4.21-1 |
| file_project | file | >= 0 < 4.20-1 | 4.20-1 |
| file_project | file | >= 0 < 4.21-1 | 4.21-1 |
| file_project | file | >= 0 < 4.20-1 | 4.20-1 |
| file_project | file | >= 0 < 4.21-1 | 4.21-1 |
| file_project | file | >= 0 < 4.20-1 | 4.20-1 |
| file_project | file | >= 0 < 4.21-1 | 4.21-1 |
| file_project | file | >= 0 < 4.20-1 | 4.20-1 |
CVSS provenance
nvdv2.09.3CRITICALAV:N/AC:M/Au:N/C:C/I:C/A:C
osv9.3CRITICAL
vendor_debian9.3MEDIUM
vendor_redhat9.3CRITICAL
CVEs like this are exactly what “Exploited This Week” covers.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
BSD
FreeBSD-SA-07:04.file: Heap overflow in file(1)
bsd_advisories·2007-05-23·CVSS 9.3
CVE-2007-1536 [CRITICAL] FreeBSD-SA-07:04.file: Heap overflow in file(1)
FreeBSD-SA-07:04.file Security Advisory
The FreeBSD Project
Topic: Heap overflow in file(1)
Category: contrib
Module: file
Announced: 2007-05-23
Affects: All FreeBSD releases.
Corrected: 2007-05-23 16:12:51 UTC (RELENG_6, 6.2-STABLE)
2007-05-23 16:13:07 UTC (RELENG_6_2, 6.2-RELEASE-p5)
2007-05-23 16:13:20 UTC (RELENG_6_1, 6.1-RELEASE-p17)
2007-05-23 16:12:10 UTC (RELENG_5, 5.5-STABLE)
2007-05-23 16:12:35 UTC (RELENG_5_5, 5.5-RELEASE-p13)
CVE Name: CVE-2007-1536
For general information regarding FreeBSD Security Advisories,
including descriptions of the fields above, security branches, and the
following sections, please visit .
I. Background
The file(1) utility attempts to classify file system objects based on
filesystem, magic number and language tests.
The libmagic(3) library provid
Red Hat
file integer overflow
vendor_redhat·2007-05-23·CVSS 9.3
CVE-2007-2799 [CRITICAL] CWE-190 file integer overflow
file integer overflow
Integer overflow in the "file" program 4.20, when running on 32-bit systems, as used in products including The Sleuth Kit, might allow user-assisted attackers to execute arbitrary code via a large file that triggers an overflow that bypasses an assert() statement. NOTE: this issue is due to an incorrect patch for CVE-2007-1536.
Ubuntu
file vulnerability
vendor_ubuntu·2007-03-22
CVE-2007-1536 file vulnerability
Title: file vulnerability
Summary: file vulnerability
Jean-Sebastien Guay-Leroux discovered that "file" did not correctly
check the size of allocated heap memory. If a user were tricked into
examining a specially crafted file with the "file" utility, a remote
attacker could execute arbitrary code with user privileges.
Instructions: In general, a standard system upgrade is sufficient to effect the
necessary changes.
Red Hat
file 4.20 fixes a heap overflow in that can result in arbitrary code execution
vendor_redhat·2007-02-08·CVSS 9.3
CVE-2007-1536 [CRITICAL] file 4.20 fixes a heap overflow in that can result in arbitrary code execution
file 4.20 fixes a heap overflow in that can result in arbitrary code execution
Integer underflow in the file_printf function in the "file" program before 4.20 allows user-assisted attackers to execute arbitrary code via a file that triggers a heap-based buffer overflow.
Debian
CVE-2007-1536: file - Integer underflow in the file_printf function in the "file" program before 4.20 ...
vendor_debian·2007·CVSS 9.3
CVE-2007-1536 [CRITICAL] CVE-2007-1536: file - Integer underflow in the file_printf function in the "file" program before 4.20 ...
Integer underflow in the file_printf function in the "file" program before 4.20 allows user-assisted attackers to execute arbitrary code via a file that triggers a heap-based buffer overflow.
Scope: local
bookworm: resolved (fixed in 4.20-1)
bullseye: resolved (fixed in 4.20-1)
forky: resolved (fixed in 4.20-1)
sid: resolved (fixed in 4.20-1)
trixie: resolved (fixed in 4.20-1)
Debian
CVE-2007-2799: file - Integer overflow in the "file" program 4.20, when running on 32-bit systems, as ...
vendor_debian·2007·CVSS 9.3
CVE-2007-2799 [CRITICAL] CVE-2007-2799: file - Integer overflow in the "file" program 4.20, when running on 32-bit systems, as ...
Integer overflow in the "file" program 4.20, when running on 32-bit systems, as used in products including The Sleuth Kit, might allow user-assisted attackers to execute arbitrary code via a large file that triggers an overflow that bypasses an assert() statement. NOTE: this issue is due to an incorrect patch for CVE-2007-1536.
Scope: local
bookworm: resolved (fixed in 4.21-1)
bullseye: resolved (fixed in 4.21-1)
forky: resolved (fixed in 4.21-1)
sid: resolved (fixed in 4.21-1)
trixie: resolved (fixed in 4.21-1)
GHSA
GHSA-g967-rw3c-p2f7: Integer overflow in the "file" program 4
ghsa_unreviewed·2022-05-03·CVSS 9.3
CVE-2007-2799 [CRITICAL] GHSA-g967-rw3c-p2f7: Integer overflow in the "file" program 4
Integer overflow in the "file" program 4.20, when running on 32-bit systems, as used in products including The Sleuth Kit, might allow user-assisted attackers to execute arbitrary code via a large file that triggers an overflow that bypasses an assert() statement. NOTE: this issue is due to an incorrect patch for CVE-2007-1536.
GHSA
GHSA-h28w-vfj4-vh5j: Integer underflow in the file_printf function in the "file" program before 4
ghsa_unreviewed·2022-05-03
CVE-2007-1536 [HIGH] GHSA-h28w-vfj4-vh5j: Integer underflow in the file_printf function in the "file" program before 4
Integer underflow in the file_printf function in the "file" program before 4.20 allows user-assisted attackers to execute arbitrary code via a file that triggers a heap-based buffer overflow.
OSV
CVE-2007-2799: Integer overflow in the "file" program 4
osv·2007-05-23·CVSS 9.3
CVE-2007-2799 [CRITICAL] CVE-2007-2799: Integer overflow in the "file" program 4
Integer overflow in the "file" program 4.20, when running on 32-bit systems, as used in products including The Sleuth Kit, might allow user-assisted attackers to execute arbitrary code via a large file that triggers an overflow that bypasses an assert() statement. NOTE: this issue is due to an incorrect patch for CVE-2007-1536.
OSV
CVE-2007-1536: Integer underflow in the file_printf function in the "file" program before 4
osv·2007-03-20·CVSS 9.3
CVE-2007-1536 [CRITICAL] CVE-2007-1536: Integer underflow in the file_printf function in the "file" program before 4
Integer underflow in the file_printf function in the "file" program before 4.20 allows user-assisted attackers to execute arbitrary code via a file that triggers a heap-based buffer overflow.
No detection rules found.
Bugzilla
CVE-2007-1536 file 4.20 fixes a heap overflow in that can result in arbitrary code execution
bugzilla·2007-03-21·CVSS 9.3
CVE-2007-1536 [CRITICAL] CVE-2007-1536 file 4.20 fixes a heap overflow in that can result in arbitrary code execution
CVE-2007-1536 file 4.20 fixes a heap overflow in that can result in arbitrary code execution
This issue should be fixed in file-4.17-9. The fix is based on provided ubuntu
patch.
Discussion:
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.
http://rhn.redhat.com/errata/RHSA-2007-0124.html
Bugzilla
CVE-2007-1536 file 4.20 fixes a heap overflow in that can result in arbitrary code execution
bugzilla·2007-03-20·CVSS 9.3
CVE-2007-1536 [CRITICAL] CVE-2007-1536 file 4.20 fixes a heap overflow in that can result in arbitrary code execution
CVE-2007-1536 file 4.20 fixes a heap overflow in that can result in arbitrary code execution
Description of problem:
The ChangeLog states this:
2007-02-08 17:30 Christos Zoulas
* fix integer underflow in file_printf which can lead to
to exploitable heap overflow (Jean-Sebastien Guay-Lero)
Christos clarifies further:
The crux of the problem is here:
- if ((buf = realloc(ms->o.buf, len + 1024)) == NULL) {
- file_oomem(ms, len + 1024);
+ size = (ms->o.size - ms->o.left) + len + 1024;
+ if ((buf = realloc(ms->o.buf, size)) == NULL) {
Instead of allocating len + 1024 bytes on top of the previous size,
before the fix we allocated just len + 1024 bytes. So if the buffer
was let's say 4K, and we printed a string of len < 3K in this pass,
then we effectively decreased the size of the strin
Bugzilla
CVE-2007-1536 file 4.20 fixes a heap overflow in that can result in arbitrary code execution
bugzilla·2007-03-20·CVSS 9.3
CVE-2007-1536 [CRITICAL] CVE-2007-1536 file 4.20 fixes a heap overflow in that can result in arbitrary code execution
CVE-2007-1536 file 4.20 fixes a heap overflow in that can result in arbitrary code execution
+++ This bug was initially created as a clone of Bug #233161 +++
Description of problem:
The ChangeLog states this:
2007-02-08 17:30 Christos Zoulas
* fix integer underflow in file_printf which can lead to
to exploitable heap overflow (Jean-Sebastien Guay-Lero)
Christos clarifies further:
The crux of the problem is here:
- if ((buf = realloc(ms->o.buf, len + 1024)) == NULL) {
- file_oomem(ms, len + 1024);
+ size = (ms->o.size - ms->o.left) + len + 1024;
+ if ((buf = realloc(ms->o.buf, size)) == NULL) {
Instead of allocating len + 1024 bytes on top of the previous size,
before the fix we allocated just len + 1024 bytes. So if the buffer
was let's say 4K, and we printed a string of len < 3K
ftp://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2008-001.txt.aschttp://docs.info.apple.com/article.html?artnum=305530http://lists.apple.com/archives/security-announce/2007/May/msg00004.htmlhttp://mx.gw.com/pipermail/file/2007/000161.htmlhttp://openbsd.org/errata40.html#015_filehttp://secunia.com/advisories/24548http://secunia.com/advisories/24592http://secunia.com/advisories/24604http://secunia.com/advisories/24608http://secunia.com/advisories/24616http://secunia.com/advisories/24617http://secunia.com/advisories/24723http://secunia.com/advisories/24754http://secunia.com/advisories/25133http://secunia.com/advisories/25393http://secunia.com/advisories/25402http://secunia.com/advisories/25931http://secunia.com/advisories/25989http://secunia.com/advisories/27307http://secunia.com/advisories/27314http://secunia.com/advisories/29179http://security.freebsd.org/advisories/FreeBSD-SA-07:04.file.aschttp://security.gentoo.org/glsa/glsa-200703-26.xmlhttp://security.gentoo.org/glsa/glsa-200710-19.xmlhttp://slackware.com/security/viewer.php?l=slackware-security&y=2007&m=slackware-security.512926http://support.avaya.com/elmodocs2/security/ASA-2007-179.htmhttp://www.debian.org/security/2007/dsa-1274http://www.kb.cert.org/vuls/id/606700http://www.mandriva.com/security/advisories?name=MDKSA-2007:067http://www.novell.com/linux/security/advisories/2007_40_file.htmlhttp://www.novell.com/linux/security/advisories/2007_5_sr.htmlhttp://www.redhat.com/support/errata/RHSA-2007-0124.htmlhttp://www.securityfocus.com/archive/1/477861/100/0/threadedhttp://www.securityfocus.com/archive/1/477950/100/0/threadedhttp://www.securityfocus.com/bid/23021http://www.securitytracker.com/id?1017796http://www.ubuntu.com/usn/usn-439-1http://www.vupen.com/english/advisories/2007/1040http://www.vupen.com/english/advisories/2007/1939https://bugs.gentoo.org/show_bug.cgi?id=171452https://exchange.xforce.ibmcloud.com/vulnerabilities/36283https://issues.rpath.com/browse/RPL-1148https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10658ftp://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2008-001.txt.aschttp://docs.info.apple.com/article.html?artnum=305530http://lists.apple.com/archives/security-announce/2007/May/msg00004.htmlhttp://mx.gw.com/pipermail/file/2007/000161.htmlhttp://openbsd.org/errata40.html#015_filehttp://secunia.com/advisories/24548http://secunia.com/advisories/24592http://secunia.com/advisories/24604http://secunia.com/advisories/24608http://secunia.com/advisories/24616http://secunia.com/advisories/24617http://secunia.com/advisories/24723http://secunia.com/advisories/24754http://secunia.com/advisories/25133http://secunia.com/advisories/25393http://secunia.com/advisories/25402http://secunia.com/advisories/25931http://secunia.com/advisories/25989http://secunia.com/advisories/27307http://secunia.com/advisories/27314http://secunia.com/advisories/29179http://security.freebsd.org/advisories/FreeBSD-SA-07:04.file.aschttp://security.gentoo.org/glsa/glsa-200703-26.xmlhttp://security.gentoo.org/glsa/glsa-200710-19.xmlhttp://slackware.com/security/viewer.php?l=slackware-security&y=2007&m=slackware-security.512926http://support.avaya.com/elmodocs2/security/ASA-2007-179.htmhttp://www.debian.org/security/2007/dsa-1274http://www.kb.cert.org/vuls/id/606700http://www.mandriva.com/security/advisories?name=MDKSA-2007:067http://www.novell.com/linux/security/advisories/2007_40_file.htmlhttp://www.novell.com/linux/security/advisories/2007_5_sr.htmlhttp://www.redhat.com/support/errata/RHSA-2007-0124.htmlhttp://www.securityfocus.com/archive/1/477861/100/0/threadedhttp://www.securityfocus.com/archive/1/477950/100/0/threadedhttp://www.securityfocus.com/bid/23021http://www.securitytracker.com/id?1017796http://www.ubuntu.com/usn/usn-439-1http://www.vupen.com/english/advisories/2007/1040http://www.vupen.com/english/advisories/2007/1939https://bugs.gentoo.org/show_bug.cgi?id=171452https://exchange.xforce.ibmcloud.com/vulnerabilities/36283https://issues.rpath.com/browse/RPL-1148https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10658
2007-03-20
Published