FreeBSD Security Advisory FreeBSD-SA-04:16.fetch
Date: 11/19/04

  • Next message: advisories: "Corsaire Security Advisory - Netopia Timbuktu remote buffer overflow issue"
    Date: Fri, 19 Nov 2004 13:40:25 -0500

    Hash: SHA1

    FreeBSD-SA-04:16.fetch Security Advisory
                                                              The FreeBSD Project

    Topic: Overflow error in fetch

    Category: core
    Module: fetch
    Announced: 2004-11-18
    Credits: Colin Percival
    Affects: All FreeBSD versions.
    Corrected: 2004-11-18 12:02:13 UTC (RELENG_5, 5.3-STABLE)
                    2004-11-18 12:03:05 UTC (RELENG_5_3, 5.3-RELEASE-p1)
                    2004-11-18 12:04:29 UTC (RELENG_5_2, 5.2.1-RELEASE-p12)
                    2004-11-18 12:05:36 UTC (RELENG_5_1, 5.1-RELEASE-p18)
                    2004-11-18 12:05:50 UTC (RELENG_5_0, 5.0-RELEASE-p22)
                    2004-11-18 12:02:29 UTC (RELENG_4, 4.10-STABLE)
                    2004-11-18 12:06:06 UTC (RELENG_4_10, 4.10-RELEASE-p4)
                    2004-11-18 12:06:22 UTC (RELENG_4_9, 4.9-RELEASE-p13)
                    2004-11-18 12:06:36 UTC (RELENG_4_8, 4.8-RELEASE-p26)
                    2004-11-18 12:06:52 UTC (RELENG_4_7, 4.7-RELEASE-p28)
    FreeBSD only: YES

    For general information regarding FreeBSD Security Advisories,
    including descriptions of the fields above, security branches, and the
    following sections, please visit

    I. Background

    The fetch(1) utility is a tool for fetching files via FTP, HTTP, and HTTPS.

    II. Problem Description

    An integer overflow condition in the processing of HTTP headers can result
    in a buffer overflow.

    III. Impact

    A malicious server or CGI script can respond to an HTTP or HTTPS request in
    such a manner as to cause arbitrary portions of the client's memory to be
    overwritten, allowing for arbitrary code execution.

    IV. Workaround

    There is no known workaround for the affected application, although
    the ftp(1) application in the FreeBSD base system, and several
    applications in the FreeBSD Ports collection provide similar
    functionality and could be used in place of fetch(1).

    V. Solution

    Perform one of the following:

    1) Upgrade your vulnerable system to 4-STABLE or 5-STABLE, or to the
    RELENG_5_3, RELENG_5_2, RELENG_4_10, or RELENG_4_8 security branch dated
    after the correction date.

    2) To patch your present system:

    The following patches have been verified to apply to FreeBSD 4.8, 4.10,
    5.2, and 5.3 systems.

    a) Download the relevant patch from the location below, and verify the
    detached PGP signature using your PGP utility.

    # ftp
    # ftp

    b) Execute the following commands as root:

    # cd /usr/src
    # patch < /path/to/patch
    # cd /usr/src/usr.bin/fetch
    # make obj && make depend && make && make install

    3) IMPORTANT NOTE to users of FreeBSD Update:

    FreeBSD Update (security/freebsd-update in the FreeBSD Ports collection)
    is a binary security update system for the FreeBSD base system. It is
    not supported or endorsed by the FreeBSD Security team, but its author
    has requested that the following note be included in this advisory:

      FreeBSD Update uses the fetch(1) utility for downloading security
      updates to the FreeBSD base system. While these updates are
      cryptographically signed, and FreeBSD Update is therefore immune from
      most attacks, it is exposed to this vulnerability since the files
      must be fetched before their integrity can be verified.

      As a workaround, FreeBSD Update can be made to use the ftp(1) utility
      for downloading updates as follows:

      # sed -i.bak -e 's/fetch -qo/ftp -o/' /usr/local/sbin/freebsd-update
      # freebsd-update fetch
      # mv /usr/local/sbin/freebsd-update.bak /usr/local/sbin/freebsd-update
      # freebsd-update install

    VI. Correction details

    The following list contains the revision numbers of each file that was
    corrected in FreeBSD.

    Branch Revision
    - -------------------------------------------------------------------------
      src/UPDATING 1.342.
    - -------------------------------------------------------------------------

    VII. References

    <other info on vulnerability>
    Version: GnuPG v1.2.6 (FreeBSD)

    -----END PGP SIGNATURE-----


  • Next message: advisories: "Corsaire Security Advisory - Netopia Timbuktu remote buffer overflow issue"

    Relevant Pages