Vulnerabilities > CVE-2004-0376 - Denial Of Service vulnerability in OFTPD Port Argument

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
oftpd
nessus

Summary

oftpd 0.3.6 and earlier allows remote attackers to cause a denial of service (crash) via a PORT command with a large value.

Vulnerable Configurations

Part Description Count
Application
Oftpd
1

Nessus

  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_OFTPD_037.NASL
    descriptionThe following package needs to be updated: oftpd
    last seen2016-09-26
    modified2011-10-03
    plugin id12587
    published2004-07-06
    reporterTenable
    sourcehttps://www.tenable.com/plugins/index.php?view=single&id=12587
    titleFreeBSD : oftpd denial-of-service vulnerability (PORT command) (130)
    code
    #%NASL_MIN_LEVEL 999999
    
    # @DEPRECATED@
    #
    # This script has been deprecated by freebsd_pkg_290d81b980f111d896450020ed76ef5a.nasl.
    #
    # Disabled on 2011/10/02.
    #
    
    #
    # (C) Tenable Network Security, Inc.
    #
    # This script contains information extracted from VuXML :
    #
    # Copyright 2003-2006 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(12587);
     script_version("1.12");
     script_bugtraq_id(9980);
     script_cve_id("CVE-2004-0376");
    
     script_name(english:"FreeBSD : oftpd denial-of-service vulnerability (PORT command) (130)");
    
    script_set_attribute(attribute:'synopsis', value: 'The remote host is missing a security update');
    script_set_attribute(attribute:'description', value:'The following package needs to be updated: oftpd');
     script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:P");
     script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
     script_set_attribute(attribute:"exploitability_ease", value:"No exploit is required");
     script_set_attribute(attribute:"exploit_available", value:"true");
    script_set_attribute(attribute:'solution', value: 'Update the package on the remote host');
    script_set_attribute(attribute: 'see_also', value: 'http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=482
    http://secunia.com/advisories/30916/
    http://www.adobe.com/support/techdocs/331153.html
    http://www.mozilla.org/security/announce/2008/mfsa2008-37.html
    http://www.mozilla.org/security/announce/2008/mfsa2008-38.html
    http://www.mozilla.org/security/announce/2008/mfsa2008-39.html
    http://www.mozilla.org/security/announce/2008/mfsa2008-40.html
    http://www.php.net/ChangeLog-5.php#5.2.7
    http://www.sektioneins.de/advisories/SE-2008-06.txt
    http://www.time-travellers.org/oftpd/oftpd-dos.html');
    script_set_attribute(attribute:'see_also', value: 'http://www.FreeBSD.org/ports/portaudit/290d81b9-80f1-11d8-9645-0020ed76ef5a.html');
    
     script_set_attribute(attribute:"plugin_publication_date", value: "2004/07/06");
     script_cvs_date("Date: 2018/07/20  0:18:52");
     script_end_attributes();
     script_summary(english:"Check for oftpd");
     script_category(ACT_GATHER_INFO);
     script_copyright(english:"This script is Copyright (C) 2004-2018 Tenable Network Security, Inc.");
     family["english"] = "FreeBSD Local Security Checks";
     script_family(english:family["english"]);
     script_dependencies("ssh_get_info.nasl");
     script_require_keys("Host/FreeBSD/pkg_info");
     exit(0);
    }
    
    # Deprecated.
    exit(0, "This plugin has been deprecated. Refer to plugin #36864 (freebsd_pkg_290d81b980f111d896450020ed76ef5a.nasl) instead.");
    
    global_var cvss_score;
    cvss_score=5;
    include('freebsd_package.inc');
    
    
    pkg_test(pkg:"oftpd<0.3.7");
    
  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_290D81B980F111D896450020ED76EF5A.NASL
    descriptionPhilippe Oechslin reported a denial-of-service vulnerability in oftpd. The oftpd server can be crashed by sending a PORT command containing an integer over 8 bits long (over 255).
    last seen2020-06-01
    modified2020-06-02
    plugin id36864
    published2009-04-23
    reporterThis script is Copyright (C) 2009-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/36864
    titleFreeBSD : oftpd denial-of-service vulnerability (PORT command) (290d81b9-80f1-11d8-9645-0020ed76ef5a)
    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(36864);
      script_version("1.13");
      script_cvs_date("Date: 2019/08/02 13:32:36");
    
      script_cve_id("CVE-2004-0376");
      script_bugtraq_id(9980);
    
      script_name(english:"FreeBSD : oftpd denial-of-service vulnerability (PORT command) (290d81b9-80f1-11d8-9645-0020ed76ef5a)");
      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:
    "Philippe Oechslin reported a denial-of-service vulnerability in oftpd.
    The oftpd server can be crashed by sending a PORT command containing
    an integer over 8 bits long (over 255)."
      );
      # http://www.time-travellers.org/oftpd/oftpd-dos.html
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.time-travellers.org/oftpd/oftpd-dos.html"
      );
      # https://vuxml.freebsd.org/freebsd/290d81b9-80f1-11d8-9645-0020ed76ef5a.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?a8f71c05"
      );
      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_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"No exploit is required");
      script_set_attribute(attribute:"exploit_available", value:"true");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:freebsd:freebsd:oftpd");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:freebsd:freebsd");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2004/03/04");
      script_set_attribute(attribute:"patch_publication_date", value:"2004/03/28");
      script_set_attribute(attribute:"plugin_publication_date", value:"2009/04/23");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2009-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:"oftpd<0.3.7")) 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 familyFTP
    NASL idOFTPD_DOS.NASL
    descriptionThe remote FTP server seems to be running oftpd version 0.3.6 or older. There is a bug in this version which may allow an attacker to disable this service remotely by sending a malformed PORT command. An attacker may exploit this flaw to prevent this system from doing its job.
    last seen2020-06-01
    modified2020-06-02
    plugin id12125
    published2004-04-04
    reporterThis script is Copyright (C) 2004-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/12125
    titleoftpd PORT Command Remote DoS
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    
    include("compat.inc");
    
    if(description)
    {
     script_id(12125);
     script_version ("1.17");
    
     script_cve_id("CVE-2004-0376");
     script_bugtraq_id(9980);
    
     script_name(english:"oftpd PORT Command Remote DoS");
     
     script_set_attribute(attribute:"synopsis", value:
    "The remote host has an application that is affected by a
    denial of service vulnerability." );
     script_set_attribute(attribute:"description", value:
    "The remote FTP server seems to be running oftpd version 
    0.3.6 or older. There is a bug in this version which may 
    allow an attacker to disable this service remotely by 
    sending a malformed PORT command.
    
    An attacker may exploit this flaw to prevent this system 
    from doing its job." );
     script_set_attribute(attribute:"solution", value:
    "Upgrade to oftpd 0.3.7 or newer" );
     script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:P");
     script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
     script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
     script_set_attribute(attribute:"exploit_available", value:"false");
    	 	     
     script_set_attribute(attribute:"plugin_publication_date", value: "2004/04/04");
     script_set_attribute(attribute:"vuln_publication_date", value: "2004/03/25");
     script_cvs_date("Date: 2018/07/16 14:09:13");
    script_set_attribute(attribute:"plugin_type", value:"remote");
    script_end_attributes();
    
    		    
     
     script_summary(english:"Determines if the remote oftpd server might be vulnerable to a DoS attack");
     script_category(ACT_ATTACK);
     script_family(english:"FTP");
     
     script_copyright(english:"This script is Copyright (C) 2004-2018 Tenable Network Security, Inc.");
    		  
     script_dependencie("ftpserver_detect_type_nd_version.nasl", "ftp_anonymous.nasl");
     script_require_keys("ftp/login", "ftp/wuftpd");
     script_require_ports("Services/ftp", 21);
      
     exit(0);
    }
    
    #
    # The script code starts here : 
    #
    include("ftp_func.inc");
    
    login = get_kb_item("ftp/login");
    pass  = get_kb_item("ftp/password");
    
    
    port = get_ftp_port(default: 21);
    
    banner = get_ftp_banner(port: port);
    
    if ("Service ready for new user" >!< banner ) exit(0);
    
    if ( ! login ) login = "ftp";
    
    soc = open_sock_tcp(port);
    if (! soc) exit(1);
    
    if (! ftp_authenticate(socket:soc, user:login, pass:pass))
      exit(1);
    
      # oftpd 0.3.6 and older will happily return the size of
      # a directory, whereas 0.3.7 issues an error.
      send(socket:soc, data:'TYPE I\r\n');
      err = ftp_recv_line(socket:soc);
      send(socket:soc, data:'SIZE .\r\n');
      err = ftp_recv_line(socket:soc);
      if ( egrep(pattern:"^213 [0-9]*", string:err) ) security_warning(port);
    
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-473.NASL
    descriptionA vulnerability was discovered in oftpd, an anonymous FTP server, whereby a remote attacker could cause the oftpd process to crash by specifying a large value in a PORT command.
    last seen2020-06-01
    modified2020-06-02
    plugin id15310
    published2004-09-29
    reporterThis script is Copyright (C) 2004-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/15310
    titleDebian DSA-473-1 : oftpd - denial of service
    code
    #%NASL_MIN_LEVEL 80502
    
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Debian Security Advisory DSA-473. The text 
    # itself is copyright (C) Software in the Public Interest, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(15310);
      script_version("1.20");
      script_cvs_date("Date: 2019/08/02 13:32:17");
    
      script_cve_id("CVE-2004-0376");
      script_bugtraq_id(9980);
      script_xref(name:"DSA", value:"473");
    
      script_name(english:"Debian DSA-473-1 : oftpd - denial of service");
      script_summary(english:"Checks dpkg output for the updated package");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Debian host is missing a security-related update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "A vulnerability was discovered in oftpd, an anonymous FTP server,
    whereby a remote attacker could cause the oftpd process to crash by
    specifying a large value in a PORT command."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=216871"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.debian.org/security/2004/dsa-473"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "For the stable distribution (woody) this problem has been fixed in
    version 0.3.6-6.
    
    We recommend that you update your oftpd package."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"No exploit is required");
      script_set_attribute(attribute:"exploit_available", value:"true");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:oftpd");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:3.0");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2004/04/03");
      script_set_attribute(attribute:"plugin_publication_date", value:"2004/09/29");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2004-2019 Tenable Network Security, Inc.");
      script_family(english:"Debian Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Debian/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("debian_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Debian/release")) audit(AUDIT_OS_NOT, "Debian");
    if (!get_kb_item("Host/Debian/dpkg-l")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    if (deb_check(release:"3.0", prefix:"oftpd", reference:"0.3.6-6")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:deb_report_get());
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-200403-08.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-200403-08 (oftpd DoS vulnerability) Issuing a port command with a number higher than 255 causes the server to crash. The port command may be issued before any authentication takes place, meaning the attacker does not need to know a valid username and password in order to exploit this vulnerability. Impact : This exploit causes a denial of service. Workaround : While a workaround is not currently known for this issue, all users are advised to upgrade to the latest version of the affected package.
    last seen2020-06-01
    modified2020-06-02
    plugin id14459
    published2004-08-30
    reporterThis script is Copyright (C) 2004-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/14459
    titleGLSA-200403-08 : oftpd DoS vulnerability
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Gentoo Linux Security Advisory GLSA 200403-08.
    #
    # The advisory text is Copyright (C) 2001-2018 Gentoo Foundation, Inc.
    # and licensed under the Creative Commons - Attribution / Share Alike 
    # license. See http://creativecommons.org/licenses/by-sa/3.0/
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(14459);
      script_version("1.12");
      script_cvs_date("Date: 2019/08/02 13:32:41");
    
      script_cve_id("CVE-2004-0376");
      script_xref(name:"GLSA", value:"200403-08");
    
      script_name(english:"GLSA-200403-08 : oftpd DoS vulnerability");
      script_summary(english:"Checks for updated package(s) in /var/db/pkg");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Gentoo host is missing one or more security-related
    patches."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "The remote host is affected by the vulnerability described in GLSA-200403-08
    (oftpd DoS vulnerability)
    
        Issuing a port command with a number higher than 255 causes the server
        to crash. The port command may be issued before any authentication
        takes place, meaning the attacker does not need to know a valid
        username and password in order to exploit this vulnerability.
      
    Impact :
    
        This exploit causes a denial of service.
      
    Workaround :
    
        While a workaround is not currently known for this issue, all users are
        advised to upgrade to the latest version of the affected package."
      );
      # http://www.time-travellers.org/oftpd/
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.time-travellers.org/oftpd/"
      );
      # http://www.time-travellers.org/oftpd/oftpd-dos.html
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.time-travellers.org/oftpd/oftpd-dos.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security.gentoo.org/glsa/200403-08"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "All users should upgrade to the current version of the affected
        package:
        # emerge sync
        # emerge -pv '>=net-ftp/oftpd-0.3.7'
        # emerge '>=net-ftp/oftpd-0.3.7'"
      );
      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:gentoo:linux:oftpd");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:gentoo:linux");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2004/03/29");
      script_set_attribute(attribute:"plugin_publication_date", value:"2004/08/30");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2004-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Gentoo Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Gentoo/release", "Host/Gentoo/qpkg-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("qpkg.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Gentoo/release")) audit(AUDIT_OS_NOT, "Gentoo");
    if (!get_kb_item("Host/Gentoo/qpkg-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    
    if (qpkg_check(package:"net-ftp/oftpd", unaffected:make_list("ge 0.3.7"), vulnerable:make_list("le 0.3.6"))) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:qpkg_report_get());
      else security_warning(0);
      exit(0);
    }
    else
    {
      tested = qpkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "net-ftp/oftpd");
    }