Vulnerabilities > CVE-2005-2335 - Improper Restriction of Operations Within the Bounds of A Memory Buffer vulnerability in Fetchmail

047910
CVSS 5.0 - MEDIUM
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
NONE
Availability impact
PARTIAL
network
low complexity
fetchmail
CWE-119
nessus

Summary

Buffer overflow in the POP3 client in Fetchmail before 6.2.5.2 allows remote POP3 servers to cause a denial of service and possibly execute arbitrary code via long UIDL responses. NOTE: a typo in an advisory accidentally used the wrong CVE identifier for the Fetchmail issue. This is the correct identifier.

Vulnerable Configurations

Part Description Count
Application
Fetchmail
89

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Overflow Buffers
    Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
  • Client-side Injection-induced Buffer Overflow
    This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
  • Filter Failure through Buffer Overflow
    In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
  • MIME Conversion
    An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.

Nessus

  • NASL familyMandriva Local Security Checks
    NASL idMANDRAKE_MDKSA-2005-209.NASL
    descriptionThomas Wolff and Miloslav Trmac discovered a race condition in the fetchmailconf program. fetchmailconf would create the initial output configuration file with insecure permissions and only after writing would it change permissions to be more restrictive. During that time, passwords and other data could be exposed to other users on the system unless the user used a more restrictive umask setting. As well, the Mandriva Linux 2006 packages did not contain the patch that corrected the issues fixed in MDKSA-2005:126, namely a buffer overflow in fetchmail
    last seen2020-06-01
    modified2020-06-02
    plugin id20442
    published2006-01-15
    reporterThis script is Copyright (C) 2006-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/20442
    titleMandrake Linux Security Advisory : fetchmail (MDKSA-2005:209)
    code
    #%NASL_MIN_LEVEL 80502
    
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Mandrake Linux Security Advisory MDKSA-2005:209. 
    # The text itself is copyright (C) Mandriva S.A.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(20442);
      script_version ("1.23");
      script_cvs_date("Date: 2019/08/02 13:32:48");
    
      script_cve_id("CVE-2005-2335", "CVE-2005-3088");
      script_xref(name:"MDKSA", value:"2005:209");
    
      script_name(english:"Mandrake Linux Security Advisory : fetchmail (MDKSA-2005:209)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Mandrake Linux host is missing one or more security
    updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Thomas Wolff and Miloslav Trmac discovered a race condition in the
    fetchmailconf program. fetchmailconf would create the initial output
    configuration file with insecure permissions and only after writing
    would it change permissions to be more restrictive. During that time,
    passwords and other data could be exposed to other users on the system
    unless the user used a more restrictive umask setting.
    
    As well, the Mandriva Linux 2006 packages did not contain the patch
    that corrected the issues fixed in MDKSA-2005:126, namely a buffer
    overflow in fetchmail's POP3 client (CVE-2005-2355).
    
    The updated packages have been patched to address this issue, and the
    Mandriva 2006 packages have also been patched to correct
    CVE-2005-2355."
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "Update the affected fetchmail, fetchmail-daemon and / or fetchmailconf
    packages."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:P");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:fetchmail");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:fetchmail-daemon");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:fetchmailconf");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:mandrakesoft:mandrake_linux:10.1");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:mandriva:linux:2006");
      script_set_attribute(attribute:"cpe", value:"x-cpe:/o:mandrakesoft:mandrake_linux:le2005");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2005/11/09");
      script_set_attribute(attribute:"plugin_publication_date", value:"2006/01/15");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2006-2019 Tenable Network Security, Inc.");
      script_family(english:"Mandriva Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/cpu", "Host/Mandrake/release", "Host/Mandrake/rpm-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("rpm.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Mandrake/release")) audit(AUDIT_OS_NOT, "Mandriva / Mandake Linux");
    if (!get_kb_item("Host/Mandrake/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if (cpu !~ "^(amd64|i[3-6]86|x86_64)$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Mandriva / Mandrake Linux", cpu);
    
    
    flag = 0;
    if (rpm_check(release:"MDK10.1", reference:"fetchmail-6.2.5-5.2.101mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK10.1", reference:"fetchmail-daemon-6.2.5-5.2.101mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK10.1", reference:"fetchmailconf-6.2.5-5.2.101mdk", yank:"mdk")) flag++;
    
    if (rpm_check(release:"MDK10.2", reference:"fetchmail-6.2.5-10.3.102mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK10.2", reference:"fetchmail-daemon-6.2.5-10.3.102mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK10.2", reference:"fetchmailconf-6.2.5-10.3.102mdk", yank:"mdk")) flag++;
    
    if (rpm_check(release:"MDK2006.0", reference:"fetchmail-6.2.5-11.1.20060mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK2006.0", reference:"fetchmail-daemon-6.2.5-11.1.20060mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK2006.0", reference:"fetchmailconf-6.2.5-11.1.20060mdk", yank:"mdk")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get());
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_3497D7BE2FEF45F481629063751B573A.NASL
    descriptionfetchmail
    last seen2020-06-01
    modified2020-06-02
    plugin id19339
    published2005-08-01
    reporterThis script is Copyright (C) 2005-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/19339
    titleFreeBSD : fetchmail -- remote root/code injection from malicious POP3 server (3497d7be-2fef-45f4-8162-9063751b573a)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from the FreeBSD VuXML database :
    #
    # Copyright 2003-2018 Jacques Vidrine and contributors
    #
    # Redistribution and use in source (VuXML) and 'compiled' forms (SGML,
    # HTML, PDF, PostScript, RTF and so forth) with or without modification,
    # are permitted provided that the following conditions are met:
    # 1. Redistributions of source code (VuXML) must retain the above
    #    copyright notice, this list of conditions and the following
    #    disclaimer as the first lines of this file unmodified.
    # 2. Redistributions in compiled form (transformed to other DTDs,
    #    published online in any format, converted to PDF, PostScript,
    #    RTF and other formats) must reproduce the above copyright
    #    notice, this list of conditions and the following disclaimer
    #    in the documentation and/or other materials provided with the
    #    distribution.
    # 
    # THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS"
    # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
    # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
    # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
    # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
    # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
    # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION,
    # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(19339);
      script_version("1.18");
      script_cvs_date("Date: 2019/08/02 13:32:37");
    
      script_cve_id("CVE-2005-2335");
    
      script_name(english:"FreeBSD : fetchmail -- remote root/code injection from malicious POP3 server (3497d7be-2fef-45f4-8162-9063751b573a)");
      script_summary(english:"Checks for updated package in pkg_info output");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote FreeBSD host is missing a security-related update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "fetchmail's POP3/UIDL code does not truncate received UIDs properly. A
    malicious or compromised POP3 server can thus corrupt fetchmail's
    stack and inject code when fetchmail is using UIDL, either through
    configuration, or as a result of certain server capabilities. Note
    that fetchmail is run as root on some sites, so an attack might
    compromise the root account and thus the whole machine."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=83805"
      );
      # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=212762
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=212762"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.fetchmail.info/fetchmail-SA-2005-01.txt"
      );
      # https://vuxml.freebsd.org/freebsd/3497d7be-2fef-45f4-8162-9063751b573a.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?30158de5"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected package.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:P");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:freebsd:freebsd:fetchmail");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:freebsd:freebsd");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2005/07/20");
      script_set_attribute(attribute:"patch_publication_date", value:"2005/07/20");
      script_set_attribute(attribute:"plugin_publication_date", value:"2005/08/01");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2005-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"FreeBSD Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/FreeBSD/release", "Host/FreeBSD/pkg_info");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("freebsd_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/FreeBSD/release")) audit(AUDIT_OS_NOT, "FreeBSD");
    if (!get_kb_item("Host/FreeBSD/pkg_info")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    
    if (pkg_test(save_report:TRUE, pkg:"fetchmail<6.2.5.1")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:pkg_report_get());
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2005-613.NASL
    descriptionA buffer overflow was discovered in fetchmail
    last seen2020-06-01
    modified2020-06-02
    plugin id19271
    published2005-07-22
    reporterThis script is Copyright (C) 2005-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/19271
    titleFedora Core 4 : fetchmail-6.2.5-7.fc4.1 (2005-613)
    code
    #%NASL_MIN_LEVEL 80502
    
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Fedora Security Advisory 2005-613.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(19271);
      script_version ("1.17");
      script_cvs_date("Date: 2019/08/02 13:32:24");
    
      script_cve_id("CVE-2005-2335");
      script_xref(name:"FEDORA", value:"2005-613");
    
      script_name(english:"Fedora Core 4 : fetchmail-6.2.5-7.fc4.1 (2005-613)");
      script_summary(english:"Checks rpm output for the updated packages.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Fedora Core host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "A buffer overflow was discovered in fetchmail's POP3 client. A
    malicious server could cause fetchmail to execute arbitrary code.
    
    The Common Vulnerabilities and Exposures project has assigned the name
    CVE-2005-2355 to this issue.
    
    All fetchmail users should upgrade to the updated package, which fixes
    this issue.
    
    Note that Tenable Network Security has extracted the preceding
    description block directly from the Fedora security advisory. Tenable
    has attempted to automatically clean and format it as much as possible
    without introducing additional issues."
      );
      # https://lists.fedoraproject.org/pipermail/announce/2005-July/001109.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?a1d7cc2f"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected fetchmail and / or fetchmail-debuginfo packages."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:P");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:fetchmail");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:fetchmail-debuginfo");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora_core:4");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2005/07/21");
      script_set_attribute(attribute:"plugin_publication_date", value:"2005/07/22");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2005-2019 Tenable Network Security, Inc.");
      script_family(english:"Fedora Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/RedHat/release", "Host/RedHat/rpm-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("rpm.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/RedHat/release");
    if (isnull(release) || "Fedora" >!< release) audit(AUDIT_OS_NOT, "Fedora");
    os_ver = eregmatch(pattern: "Fedora.*release ([0-9]+)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Fedora");
    os_ver = os_ver[1];
    if (! ereg(pattern:"^4([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 4.x", "Fedora " + os_ver);
    
    if (!get_kb_item("Host/RedHat/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Fedora", cpu);
    
    flag = 0;
    if (rpm_check(release:"FC4", reference:"fetchmail-6.2.5-7.fc4.1")) flag++;
    if (rpm_check(release:"FC4", reference:"fetchmail-debuginfo-6.2.5-7.fc4.1")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get());
      else security_warning(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "fetchmail / fetchmail-debuginfo");
    }
    
  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-153-1.NASL
    descriptionRoss Boylan discovered a remote buffer overflow in fetchmail. By sending invalid responses with very long UIDs, a faulty or malicious POP server could crash fetchmail or execute arbitrary code with the privileges of the user invoking fetchmail. fetchmail is commonly run as root to fetch mail for multiple user accounts; in this case, this vulnerability could be exploited to compromise the whole system. Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id20554
    published2006-01-15
    reporterUbuntu Security Notice (C) 2005-2019 Canonical, Inc. / NASL script (C) 2006-2016 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/20554
    titleUbuntu 4.10 / 5.04 : fetchmail vulnerability (USN-153-1)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Ubuntu Security Notice USN-153-1. The text 
    # itself is copyright (C) Canonical, Inc. See 
    # <http://www.ubuntu.com/usn/>. Ubuntu(R) is a registered 
    # trademark of Canonical, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(20554);
      script_version("1.13");
      script_cvs_date("Date: 2019/08/02 13:33:00");
    
      script_cve_id("CVE-2005-2335");
      script_xref(name:"USN", value:"153-1");
    
      script_name(english:"Ubuntu 4.10 / 5.04 : fetchmail vulnerability (USN-153-1)");
      script_summary(english:"Checks dpkg output for updated packages.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Ubuntu host is missing one or more security-related
    patches."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Ross Boylan discovered a remote buffer overflow in fetchmail. By
    sending invalid responses with very long UIDs, a faulty or malicious
    POP server could crash fetchmail or execute arbitrary code with the
    privileges of the user invoking fetchmail.
    
    fetchmail is commonly run as root to fetch mail for multiple user
    accounts; in this case, this vulnerability could be exploited to
    compromise the whole system.
    
    Note that Tenable Network Security has extracted the preceding
    description block directly from the Ubuntu security advisory. Tenable
    has attempted to automatically clean and format it as much as possible
    without introducing additional issues."
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "Update the affected fetchmail, fetchmail-ssl and / or fetchmailconf
    packages."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:P");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:fetchmail");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:fetchmail-ssl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:fetchmailconf");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:4.10");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:5.04");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2005/07/26");
      script_set_attribute(attribute:"plugin_publication_date", value:"2006/01/15");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"Ubuntu Security Notice (C) 2005-2019 Canonical, Inc. / NASL script (C) 2006-2016 Tenable Network Security, Inc.");
      script_family(english:"Ubuntu Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/cpu", "Host/Ubuntu", "Host/Ubuntu/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("ubuntu.inc");
    include("misc_func.inc");
    
    if ( ! get_kb_item("Host/local_checks_enabled") ) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/Ubuntu/release");
    if ( isnull(release) ) audit(AUDIT_OS_NOT, "Ubuntu");
    release = chomp(release);
    if (! ereg(pattern:"^(4\.10|5\.04)$", string:release)) audit(AUDIT_OS_NOT, "Ubuntu 4.10 / 5.04", "Ubuntu " + release);
    if ( ! get_kb_item("Host/Debian/dpkg-l") ) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Ubuntu", cpu);
    
    flag = 0;
    
    if (ubuntu_check(osver:"4.10", pkgname:"fetchmail", pkgver:"6.2.5-8ubuntu2.1")) flag++;
    if (ubuntu_check(osver:"4.10", pkgname:"fetchmailconf", pkgver:"6.2.5-8ubuntu2.1")) flag++;
    if (ubuntu_check(osver:"5.04", pkgname:"fetchmail", pkgver:"6.2.5-12ubuntu1.1")) flag++;
    if (ubuntu_check(osver:"5.04", pkgname:"fetchmail-ssl", pkgver:"6.2.5-12ubuntu1.1")) flag++;
    if (ubuntu_check(osver:"5.04", pkgname:"fetchmailconf", pkgver:"6.2.5-12ubuntu1.1")) flag++;
    
    if (flag)
    {
      security_report_v4(
        port       : 0,
        severity   : SECURITY_WARNING,
        extra      : ubuntu_report_get()
      );
      exit(0);
    }
    else
    {
      tested = ubuntu_pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "fetchmail / fetchmail-ssl / fetchmailconf");
    }
    
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-774.NASL
    descriptionEdward Shornock discovered a bug in the UIDL handling code of fetchmail, a common POP3, APOP and IMAP mail fetching utility. A malicious POP3 server could exploit this problem and inject arbitrary code that will be executed on the victim host. If fetchmail is running as root, this becomes a root exploit.
    last seen2020-06-01
    modified2020-06-02
    plugin id19430
    published2005-08-18
    reporterThis script is Copyright (C) 2005-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/19430
    titleDebian DSA-774-1 : fetchmail - buffer overflow
  • NASL familyMacOS X Local Security Checks
    NASL idMACOSX_SECUPD2006-004.NASL
    descriptionThe remote host is running Apple Mac OS X, but lacks Security Update 2006-004. This security update contains fixes for the following applications : AFP Server Bluetooth Bom DHCP dyld fetchmail gnuzip ImageIO LaunchServices OpenSSH telnet WebKit
    last seen2020-06-01
    modified2020-06-02
    plugin id22125
    published2006-08-01
    reporterThis script is Copyright (C) 2006-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/22125
    titleMac OS X Multiple Vulnerabilities (Security Update 2006-004)
  • NASL familyMandriva Local Security Checks
    NASL idMANDRAKE_MDKSA-2005-126.NASL
    descriptionA buffer overflow was discovered in fetchmail
    last seen2020-06-01
    modified2020-06-02
    plugin id19887
    published2005-10-05
    reporterThis script is Copyright (C) 2005-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/19887
    titleMandrake Linux Security Advisory : fetchmail (MDKSA-2005:126)
  • NASL familyCentOS Local Security Checks
    NASL idCENTOS_RHSA-2005-640.NASL
    descriptionUpdated fetchmail packages that fix a security flaw are now available. This update has been rated as having important security impact by the Red Hat Security Response Team. Fetchmail is a remote mail retrieval and forwarding utility. A buffer overflow was discovered in fetchmail
    last seen2020-06-01
    modified2020-06-02
    plugin id21847
    published2006-07-03
    reporterThis script is Copyright (C) 2006-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/21847
    titleCentOS 3 / 4 : fetchmail (CESA-2005:640)
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-200507-21.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-200507-21 (fetchmail: Buffer Overflow) fetchmail does not properly validate UIDs coming from a POP3 mail server. The UID is placed in a fixed length buffer on the stack, which can be overflown. Impact : Very long UIDs returned from a malicious or compromised POP3 server can cause fetchmail to crash, resulting in a Denial of Service, or allow arbitrary code to be placed on the stack. Workaround : There are no known workarounds at this time.
    last seen2020-06-01
    modified2020-06-02
    plugin id19323
    published2005-07-31
    reporterThis script is Copyright (C) 2005-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/19323
    titleGLSA-200507-21 : fetchmail: Buffer Overflow
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2005-640.NASL
    descriptionUpdated fetchmail packages that fix a security flaw are now available. This update has been rated as having important security impact by the Red Hat Security Response Team. Fetchmail is a remote mail retrieval and forwarding utility. A buffer overflow was discovered in fetchmail
    last seen2020-06-01
    modified2020-06-02
    plugin id19297
    published2005-07-25
    reporterThis script is Copyright (C) 2005-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/19297
    titleRHEL 2.1 / 3 / 4 : fetchmail (RHSA-2005:640)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2005-614.NASL
    descriptionA buffer overflow was discovered in fetchmail
    last seen2020-06-01
    modified2020-06-02
    plugin id19272
    published2005-07-22
    reporterThis script is Copyright (C) 2005-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/19272
    titleFedora Core 3 : fetchmail-6.2.5-7.fc3.1 (2005-614)

Oval

  • accepted2005-10-12T05:49:00.000-04:00
    classvulnerability
    contributors
    nameJay Beale
    organizationBastille Linux
    descriptionBuffer overflow in the POP3 client in Fetchmail before 6.2.5.2 allows remote POP3 servers to cause a denial of service and possibly execute arbitrary code via long UIDL responses. NOTE: a typo in an advisory accidentally used the wrong CVE identifier for the Fetchmail issue. This is the correct identifier.
    familyunix
    idoval:org.mitre.oval:def:1038
    statusaccepted
    submitted2005-08-15T04:00:00.000-04:00
    titleRHE3 Fetchmail Buffer Overflow via Long UIDL Responses
    version4
  • accepted2013-04-08T04:00:06.192-04:00
    classvulnerability
    contributors
    • nameJay Beale
      organizationBastille Linux
    • nameDragos Prisaca
      organizationSymantec Corporation
    • nameDragos Prisaca
      organizationG2, Inc.
    descriptionBuffer overflow in the POP3 client in Fetchmail before 6.2.5.2 allows remote POP3 servers to cause a denial of service and possibly execute arbitrary code via long UIDL responses. NOTE: a typo in an advisory accidentally used the wrong CVE identifier for the Fetchmail issue. This is the correct identifier.
    familyunix
    idoval:org.mitre.oval:def:1124
    statusaccepted
    submitted2005-08-15T04:00:00.000-04:00
    titleRHE4 Fetchmail Buffer Overflow via Long UIDL Responses
    version8
  • accepted2013-04-29T04:17:54.184-04:00
    classvulnerability
    contributors
    • nameAharon Chernin
      organizationSCAP.com, LLC
    • nameDragos Prisaca
      organizationG2, Inc.
    definition_extensions
    • commentThe operating system installed on the system is Red Hat Enterprise Linux 3
      ovaloval:org.mitre.oval:def:11782
    • commentCentOS Linux 3.x
      ovaloval:org.mitre.oval:def:16651
    • commentThe operating system installed on the system is Red Hat Enterprise Linux 4
      ovaloval:org.mitre.oval:def:11831
    • commentCentOS Linux 4.x
      ovaloval:org.mitre.oval:def:16636
    • commentOracle Linux 4.x
      ovaloval:org.mitre.oval:def:15990
    descriptionBuffer overflow in the POP3 client in Fetchmail before 6.2.5.2 allows remote POP3 servers to cause a denial of service and possibly execute arbitrary code via long UIDL responses. NOTE: a typo in an advisory accidentally used the wrong CVE identifier for the Fetchmail issue. This is the correct identifier.
    familyunix
    idoval:org.mitre.oval:def:8833
    statusaccepted
    submitted2010-07-09T03:56:16-04:00
    titleBuffer overflow in the POP3 client in Fetchmail before 6.2.5.2 allows remote POP3 servers to cause a denial of service and possibly execute arbitrary code via long UIDL responses. NOTE: a typo in an advisory accidentally used the wrong CVE identifier for the Fetchmail issue. This is the correct identifier.
    version26

Redhat

advisories
rhsa
idRHSA-2005:640
rpms
  • fetchmail-0:6.2.0-3.el3.2
  • fetchmail-0:6.2.5-6.el4.2
  • fetchmail-debuginfo-0:6.2.0-3.el3.2
  • fetchmail-debuginfo-0:6.2.5-6.el4.2

Seebug

bulletinFamilyexploit
descriptionBUGTRAQ ID: 14349 CVE(CAN) ID: CVE-2005-2335 fetchmail是免费的软件包,可以从远程POP2、POP3、IMAP、ETRN或ODMR服务器检索邮件并将其转发给本地SMTP、LMTP服务器或消息传送代理。 fetchmail的POP3客户端在处理服务器回应时存在缓冲区溢出漏洞,恶意服务器可能利用此漏洞在客户端上执行任意指令。 fetchmail-6.2.5及更早版本的处理UID的POP3代码将POP3服务器返回的相应读取到栈中固定大小的缓冲区,没有限制输入长度,这样被入侵的或恶意的POP3服务器就可以覆盖fetchmail的栈,导致完全控制受影响的系统。 在fetchmail-6.2.5.1中,漏洞修复可以通过POP3 UIDL防范代码注入,但却引入了两个空指针引用。攻击者可能利用这个漏洞导致拒绝服务。 Eric Raymond Fetchmail 6.2.5.1 Eric Raymond Fetchmail 6.2.5 Eric Raymond Fetchmail 6.2.0 RedHat Enterprise Linux WS 4 RedHat Enterprise Linux WS 3 RedHat Enterprise Linux WS 2.1 IA64 RedHat Enterprise Linux WS 2.1 RedHat Enterprise Linux ES 4 RedHat Enterprise Linux ES 3 RedHat Enterprise Linux ES 2.1 IA64 RedHat Enterprise Linux ES 2.1 RedHat Enterprise Linux AS 3 RedHat Enterprise Linux AS 2.1 IA64 RedHat Enterprise Linux AS 2.1 RedHat Desktop 4.0 RedHat Desktop 3.0 RedHat Advanced Workstation 2.1 IA64 RedHat Advanced Workstation 2.1 厂商补丁: Apple ----- 目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载: <a href="http://www.apple.com/support/downloads/" target="_blank">http://www.apple.com/support/downloads/</a> Debian ------ Debian已经为此发布了一个安全公告(DSA-774-1)以及相应补丁: DSA-774-1:New fetchmail packages fix arbitrary code execution <a href="http://www.debian.org/security/2005/dsa-774" target="_blank">http://www.debian.org/security/2005/dsa-774</a> 补丁下载: Source archives: <a href="http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1.dsc" target="_blank">http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1.dsc</a> Size/MD5 checksum: 650 3eb739416b5b7a906b56b3145cf1ba32 <a href="http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1.diff.gz" target="_blank">http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1.diff.gz</a> Size/MD5 checksum: 150578 12cdd33c6299e840ffcf3cfa00eb2e0e <a href="http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5.orig.tar.gz" target="_blank">http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5.orig.tar.gz</a> Size/MD5 checksum: 1257376 9956b30139edaa4f5f77c4d0dbd80225 Architecture independent components: <a href="http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail-ssl_6.2.5-12sarge1_all.deb" target="_blank">http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail-ssl_6.2.5-12sarge1_all.deb</a> Size/MD5 checksum: 42268 593148b798ec57fbca09340ecb139c1e <a href="http://security.debian.org/pool/updates/main/f/fetchmail/fetchmailconf_6.2.5-12sarge1_all.deb" target="_blank">http://security.debian.org/pool/updates/main/f/fetchmail/fetchmailconf_6.2.5-12sarge1_all.deb</a> Size/MD5 checksum: 101356 c7e81ed2ef2c7375e3afb9d937a1aa91 Alpha architecture: <a href="http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_alpha.deb" target="_blank">http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_alpha.deb</a> Size/MD5 checksum: 572940 7426819c3db555eb6c1b5bf866b2113d AMD64 architecture: <a href="http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_amd64.deb" target="_blank">http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_amd64.deb</a> Size/MD5 checksum: 554678 56223b7979f4e4410c05620d153a01ba ARM architecture: <a href="http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_arm.deb" target="_blank">http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_arm.deb</a> Size/MD5 checksum: 549146 b8f0493390f4aa713004f913f2696e73 Intel IA-32 architecture: <a href="http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_i386.deb" target="_blank">http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_i386.deb</a> Size/MD5 checksum: 548184 4b004ec450045c4d0d4b9fda7d9b04cc Intel IA-64 architecture: <a href="http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_ia64.deb" target="_blank">http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_ia64.deb</a> Size/MD5 checksum: 597056 5a7e4a0f676edeed83bd3e48d4747b57 HP Precision architecture: <a href="http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_hppa.deb" target="_blank">http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_hppa.deb</a> Size/MD5 checksum: 561656 5ed8c10d345f358e85f58937e7aa79c9 Motorola 680x0 architecture: <a href="http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_m68k.deb" target="_blank">http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_m68k.deb</a> Size/MD5 checksum: 537964 8ce1a7e8de2858d8b9166c7166309173 Big endian MIPS architecture: <a href="http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_mips.deb" target="_blank">http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_mips.deb</a> Size/MD5 checksum: 556648 ee365e9943ae1646eb6ac051c6645833 Little endian MIPS architecture: <a href="http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_mipsel.deb" target="_blank">http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_mipsel.deb</a> Size/MD5 checksum: 556388 5f07b01938a6171da1c319006700ec93 PowerPC architecture: <a href="http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_powerpc.deb" target="_blank">http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_powerpc.deb</a> Size/MD5 checksum: 556168 55c628ab054ef7022c679e15edde8fae IBM S/390 architecture: <a href="http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_s390.deb" target="_blank">http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_s390.deb</a> Size/MD5 checksum: 554510 5457354b0ee7ed5c735c582408396154 Sun Sparc architecture: <a href="http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_sparc.deb" target="_blank">http://security.debian.org/pool/updates/main/f/fetchmail/fetchmail_6.2.5-12sarge1_sparc.deb</a> Size/MD5 checksum: 549168 db954a1eafe045ff6f2eb4c3c64abf3f 补丁安装方法: 1. 手工安装补丁包: 首先,使用下面的命令来下载补丁软件: # wget url (url是补丁下载链接地址) 然后,使用下面的命令来安装补丁: # dpkg -i file.deb (file是相应的补丁名) 2. 使用apt-get自动安装补丁包: 首先,使用下面的命令更新内部数据库: # apt-get update 然后,使用下面的命令安装更新软件包: # apt-get upgrade Eric Raymond ------------ 目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载: Eric Raymond Patch fetchmail-patch-6.2.5.2.gz <a href="http://download.berlios.de/fetchmail/fetchmail-patch-6.2.5.2.gz" target="_blank">http://download.berlios.de/fetchmail/fetchmail-patch-6.2.5.2.gz</a> RedHat ------ RedHat已经为此发布了一个安全公告(RHSA-2005:640-01)以及相应补丁: RHSA-2005:640-01:Important: fetchmail security update 链接:<a href="http://lwn.net/Alerts/144832/?format=printable" target="_blank">http://lwn.net/Alerts/144832/?format=printable</a> Gentoo ------ Gentoo已经为此发布了一个安全公告(GLSA-200507-21)以及相应补丁: GLSA-200507-21:fetchmail: Buffer Overflow 链接:<a href="http://security.gentoo.org/glsa/glsa-200507-21.xml" target="_blank">http://security.gentoo.org/glsa/glsa-200507-21.xml</a> 所有fetchmail用户都应升级到最新版本: # emerge --sync # emerge --ask --oneshot --verbose ">=net-mail/fetchmail-6.2.5.2"
idSSV:386
last seen2017-11-19
modified2006-11-03
published2006-11-03
reporterRoot
sourcehttps://www.seebug.org/vuldb/ssvid-386
titleFetchmail POP3客户端缓冲区溢出漏洞