<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE glsa SYSTEM "http://www.gentoo.org/dtd/glsa.dtd">
<glsa id="200705-25">
  <title>file: Integer overflow</title>
  <synopsis>
    An integer overflow vulnerability has been reported in file allowing for
    the user-assisted execution of arbitrary code.
  </synopsis>
  <product type="ebuild">file</product>
  <announced>2007-05-31</announced>
  <revised count="02">2007-06-01</revised>
  <bug>179583</bug>
  <access>remote</access>
  <affected>
    <package name="sys-apps/file" auto="yes" arch="x86 ppc hppa">
      <unaffected range="ge">4.21</unaffected>
      <vulnerable range="lt">4.21</vulnerable>
    </package>
  </affected>
  <background>
    <p>
    file is a utility that guesses a file format by scanning binary data
    for patterns.
    </p>
  </background>
  <description>
    <p>
    Colin Percival from FreeBSD reported that the previous fix for the
    file_printf() buffer overflow introduced a new integer overflow.
    </p>
  </description>
  <impact type="high">
    <p>
    A remote attacker could entice a user to run the file program on an
    overly large file (more than 1Gb) that would trigger an integer
    overflow on 32-bit systems, possibly leading to the execution of
    arbitrary code with the rights of the user running file.
    </p>
  </impact>
  <workaround>
    <p>
    There is no known workaround at this time.
    </p>
  </workaround>
  <resolution>
    <p>
    Since file is a system package, all Gentoo users should upgrade to the
    latest version:
    </p>
    <code>
    # emerge --sync
    # emerge --ask --oneshot --verbose "&gt;=sys-apps/file-4.21"</code>
  </resolution>
  <references>
    <uri link="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-2799">CVE-2007-2799</uri>
  </references>
  <metadata tag="submitter" timestamp="2007-05-28T10:04:58Z">
    falco
  </metadata>
  <metadata tag="bugReady" timestamp="2007-05-31T06:59:45Z">
    jaervosz
  </metadata>
</glsa>
