Vulnerabilities > CVE-2010-2542 - Out-of-bounds Write vulnerability in Git-Scm GIT

047910
CVSS 0.0 - NONE
Attack vector
UNKNOWN
Attack complexity
UNKNOWN
Privileges required
UNKNOWN
Confidentiality impact
UNKNOWN
Integrity impact
UNKNOWN
Availability impact
UNKNOWN

Summary

Stack-based buffer overflow in the is_git_directory function in setup.c in Git before 1.7.2.1 allows local users to gain privileges via a long gitdir: field in a .git file in a working copy.

Vulnerable Configurations

Part Description Count
Application
Git-Scm
362

Common Weakness Enumeration (CWE)

Nessus

  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_827BC2B795ED11DF916000E0815B8DA8.NASL
    descriptionGreg Brockman reports : If an attacker were to create a crafted working copy where the user runs any git command, the attacker could force execution of arbitrary code.
    last seen2020-06-01
    modified2020-06-02
    plugin id47814
    published2010-07-23
    reporterThis script is Copyright (C) 2010-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/47814
    titleFreeBSD : git -- buffer overflow vulnerability (827bc2b7-95ed-11df-9160-00e0815b8da8)
    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(47814);
      script_version("1.10");
      script_cvs_date("Date: 2019/08/02 13:32:40");
    
      script_cve_id("CVE-2010-2542");
    
      script_name(english:"FreeBSD : git -- buffer overflow vulnerability (827bc2b7-95ed-11df-9160-00e0815b8da8)");
      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:
    "Greg Brockman reports :
    
    If an attacker were to create a crafted working copy where the user
    runs any git command, the attacker could force execution of arbitrary
    code."
      );
      # http://git.kernel.org/?p=git/git.git;a=commit;h=3c9d0414ed2db0167e6c828b547be8fc9f88fccc
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?d2db8048"
      );
      # http://www.openwall.com/lists/oss-security/2010/07/22/1
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.openwall.com/lists/oss-security/2010/07/22/1"
      );
      # https://vuxml.freebsd.org/freebsd/827bc2b7-95ed-11df-9160-00e0815b8da8.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?455ac820"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected package.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:freebsd:freebsd:git");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:freebsd:freebsd");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2010/07/20");
      script_set_attribute(attribute:"patch_publication_date", value:"2010/07/23");
      script_set_attribute(attribute:"plugin_publication_date", value:"2010/07/23");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2010-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:"git>=1.5.6<1.7.1.1_1")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:pkg_report_get());
      else security_hole(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familySuSE Local Security Checks
    NASL idSUSE_11_3_GIT-110117.NASL
    descriptionThis update fixes two vulnerabilities : XSS vulnerability in gitweb; a remote attacker could craft an URL such that arbitrary content would be inserted to the generated web page. Stack overflow vulnerability that can lead to arbitrary code execution if user runs any git command on a specially crafted git working copy. Security Issue references : - [CVE-2010-3906](http://cve.mitre.org/cgi-bin/cvename.cgi?nam e=CVE-2010-3906) - [CVE-2010-2542](http://cve.mitre.org/cgi-bin/cvename.cgi?nam e=CVE-2010-2542)
    last seen2020-06-01
    modified2020-06-02
    plugin id75516
    published2014-06-13
    reporterThis script is Copyright (C) 2014-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/75516
    titleopenSUSE Security Update : git (openSUSE-SU-2011:0115-1)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from openSUSE Security Update git-3832.
    #
    # The text description of this plugin is (C) SUSE LLC.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(75516);
      script_version("1.4");
      script_cvs_date("Date: 2019/10/25 13:36:41");
    
      script_cve_id("CVE-2010-2542", "CVE-2010-3906");
    
      script_name(english:"openSUSE Security Update : git (openSUSE-SU-2011:0115-1)");
      script_summary(english:"Check for the git-3832 patch");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote openSUSE host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "This update fixes two vulnerabilities :
    
    XSS vulnerability in gitweb; a remote attacker could craft an URL such
    that arbitrary content would be inserted to the generated web page.
    
    Stack overflow vulnerability that can lead to arbitrary code
    execution if user runs any git command on a specially
    crafted git working copy.
    
    Security Issue references :
    
    -
    [CVE-2010-3906](http://cve.mitre.org/cgi-bin/cvename.cgi?nam
    e=CVE-2010-3906) 
    
    -
    [CVE-2010-2542](http://cve.mitre.org/cgi-bin/cvename.cgi?nam
    e=CVE-2010-2542)"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-2542"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-3906"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=624586"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=659281"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://lists.opensuse.org/opensuse-updates/2011-02/msg00010.html"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected git packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:git");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:git-arch");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:git-core");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:git-cvs");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:git-daemon");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:git-email");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:git-gui");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:git-remote-helpers");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:git-svn");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:git-web");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:gitk");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:opensuse:11.3");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2011/01/17");
      script_set_attribute(attribute:"plugin_publication_date", value:"2014/06/13");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2014-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"SuSE Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/SuSE/release", "Host/SuSE/rpm-list", "Host/cpu");
    
      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/SuSE/release");
    if (isnull(release) || release =~ "^(SLED|SLES)") audit(AUDIT_OS_NOT, "openSUSE");
    if (release !~ "^(SUSE11\.3)$") audit(AUDIT_OS_RELEASE_NOT, "openSUSE", "11.3", release);
    if (!get_kb_item("Host/SuSE/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    ourarch = get_kb_item("Host/cpu");
    if (!ourarch) audit(AUDIT_UNKNOWN_ARCH);
    if (ourarch !~ "^(i586|i686|x86_64)$") audit(AUDIT_ARCH_NOT, "i586 / i686 / x86_64", ourarch);
    
    flag = 0;
    
    if ( rpm_check(release:"SUSE11.3", reference:"git-1.7.1-2.3.1") ) flag++;
    if ( rpm_check(release:"SUSE11.3", reference:"git-arch-1.7.1-2.3.1") ) flag++;
    if ( rpm_check(release:"SUSE11.3", reference:"git-core-1.7.1-2.3.1") ) flag++;
    if ( rpm_check(release:"SUSE11.3", reference:"git-cvs-1.7.1-2.3.1") ) flag++;
    if ( rpm_check(release:"SUSE11.3", reference:"git-daemon-1.7.1-2.3.1") ) flag++;
    if ( rpm_check(release:"SUSE11.3", reference:"git-email-1.7.1-2.3.1") ) flag++;
    if ( rpm_check(release:"SUSE11.3", reference:"git-gui-1.7.1-2.3.1") ) flag++;
    if ( rpm_check(release:"SUSE11.3", reference:"git-remote-helpers-1.7.1-2.3.1") ) flag++;
    if ( rpm_check(release:"SUSE11.3", reference:"git-svn-1.7.1-2.3.1") ) flag++;
    if ( rpm_check(release:"SUSE11.3", reference:"git-web-1.7.1-2.3.1") ) flag++;
    if ( rpm_check(release:"SUSE11.3", reference:"gitk-1.7.1-2.3.1") ) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:rpm_report_get());
      else security_hole(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "git / git-arch / git-core / git-cvs / git-daemon / git-email / etc");
    }
    
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2010-15387.NASL
    descriptionThis fixes a security issue where a special crafted .git file could cause arbitrary code execution (CVE-2010-2542). 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.
    last seen2020-06-01
    modified2020-06-02
    plugin id49768
    published2010-10-06
    reporterThis script is Copyright (C) 2010-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/49768
    titleFedora 14 : cgit-0.8.2.1-4.fc14 (2010-15387)
    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 2010-15387.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(49768);
      script_version("1.10");
      script_cvs_date("Date: 2019/08/02 13:32:31");
    
      script_cve_id("CVE-2010-2542");
      script_bugtraq_id(41891);
      script_xref(name:"FEDORA", value:"2010-15387");
    
      script_name(english:"Fedora 14 : cgit-0.8.2.1-4.fc14 (2010-15387)");
      script_summary(english:"Checks rpm output for the updated package.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Fedora host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "This fixes a security issue where a special crafted .git file could
    cause arbitrary code execution (CVE-2010-2542).
    
    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."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.redhat.com/show_bug.cgi?id=618108"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2010-October/048993.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?a2aa8320"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected cgit package.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:ND/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_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:cgit");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:14");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2010/09/28");
      script_set_attribute(attribute:"plugin_publication_date", value:"2010/10/06");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2010-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:"^14([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 14.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:"FC14", reference:"cgit-0.8.2.1-4.fc14")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:rpm_report_get());
      else security_hole(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "cgit");
    }
    
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-201401-06.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-201401-06 (Git: Privilege escalation) Git contains a stack-based buffer overflow in the is_git_directory function in setup.c. Impact : A local attacker could gain escalated privileges via a specially crafted git repository. Workaround : There is no known workaround at this time.
    last seen2020-06-01
    modified2020-06-02
    plugin id71906
    published2014-01-12
    reporterThis script is Copyright (C) 2014-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/71906
    titleGLSA-201401-06 : Git: Privilege escalation
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Gentoo Linux Security Advisory GLSA 201401-06.
    #
    # The advisory text is Copyright (C) 2001-2015 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(71906);
      script_version("1.5");
      script_cvs_date("Date: 2018/07/12 19:01:15");
    
      script_cve_id("CVE-2010-2542");
      script_bugtraq_id(41891);
      script_xref(name:"GLSA", value:"201401-06");
    
      script_name(english:"GLSA-201401-06 : Git: Privilege escalation");
      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-201401-06
    (Git: Privilege escalation)
    
        Git contains a stack-based buffer overflow in the is_git_directory
          function in setup.c.
      
    Impact :
    
        A local attacker could gain escalated privileges via a specially crafted
          git repository.
      
    Workaround :
    
        There is no known workaround at this time."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security.gentoo.org/glsa/201401-06"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "All Git users should upgrade to the latest version:
          # emerge --sync
          # emerge --ask --oneshot --verbose '>=dev-vcs/git-1.7.2.2'
        NOTE: This is a legacy GLSA. Updates for all affected architectures are
          available since September 11, 2010. It is likely that your system is
          already no longer affected by this issue."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/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_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:gentoo:linux:git");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:gentoo:linux");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2014/01/10");
      script_set_attribute(attribute:"plugin_publication_date", value:"2014/01/12");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2014-2018 Tenable Network Security, Inc.");
      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:"dev-vcs/git", unaffected:make_list("ge 1.7.2.2"), vulnerable:make_list("lt 1.7.2.2"))) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:qpkg_report_get());
      else security_hole(0);
      exit(0);
    }
    else
    {
      tested = qpkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "Git");
    }
    
  • NASL familySuSE Local Security Checks
    NASL idSUSE_11_2_GIT-110117.NASL
    descriptionThis update fixes two vulnerabilities : XSS vulnerability in gitweb; a remote attacker could craft an URL such that arbitrary content would be inserted to the generated web page. Stack overflow vulnerability that can lead to arbitrary code execution if user runs any git command on a specially crafted git working copy. Security Issue references : - [CVE-2010-3906](http://cve.mitre.org/cgi-bin/cvename.cgi?nam e=CVE-2010-3906) - [CVE-2010-2542](http://cve.mitre.org/cgi-bin/cvename.cgi?nam e=CVE-2010-2542)
    last seen2020-06-01
    modified2020-06-02
    plugin id53727
    published2011-05-05
    reporterThis script is Copyright (C) 2011-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/53727
    titleopenSUSE Security Update : git (openSUSE-SU-2011:0115-1)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from openSUSE Security Update git-3831.
    #
    # The text description of this plugin is (C) SUSE LLC.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(53727);
      script_version("1.5");
      script_cvs_date("Date: 2019/10/25 13:36:40");
    
      script_cve_id("CVE-2010-2542", "CVE-2010-3906");
    
      script_name(english:"openSUSE Security Update : git (openSUSE-SU-2011:0115-1)");
      script_summary(english:"Check for the git-3831 patch");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote openSUSE host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "This update fixes two vulnerabilities :
    
    XSS vulnerability in gitweb; a remote attacker could craft an URL such
    that arbitrary content would be inserted to the generated web page.
    
    Stack overflow vulnerability that can lead to arbitrary code
    execution if user runs any git command on a specially
    crafted git working copy.
    
    Security Issue references :
    
    -
    [CVE-2010-3906](http://cve.mitre.org/cgi-bin/cvename.cgi?nam
    e=CVE-2010-3906) 
    
    -
    [CVE-2010-2542](http://cve.mitre.org/cgi-bin/cvename.cgi?nam
    e=CVE-2010-2542)"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://cve.mitre.org/cgi-bin/cvename.cgi?nam"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=624586"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=659281"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://lists.opensuse.org/opensuse-updates/2011-02/msg00010.html"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected git packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:git");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:git-arch");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:git-core");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:git-cvs");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:git-daemon");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:git-email");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:git-gui");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:git-svn");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:git-web");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:gitk");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:opensuse:11.2");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2011/01/17");
      script_set_attribute(attribute:"plugin_publication_date", value:"2011/05/05");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2011-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"SuSE Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/SuSE/release", "Host/SuSE/rpm-list", "Host/cpu");
    
      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/SuSE/release");
    if (isnull(release) || release =~ "^(SLED|SLES)") audit(AUDIT_OS_NOT, "openSUSE");
    if (release !~ "^(SUSE11\.2)$") audit(AUDIT_OS_RELEASE_NOT, "openSUSE", "11.2", release);
    if (!get_kb_item("Host/SuSE/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    ourarch = get_kb_item("Host/cpu");
    if (!ourarch) audit(AUDIT_UNKNOWN_ARCH);
    if (ourarch !~ "^(i586|i686|x86_64)$") audit(AUDIT_ARCH_NOT, "i586 / i686 / x86_64", ourarch);
    
    flag = 0;
    
    if ( rpm_check(release:"SUSE11.2", reference:"git-1.6.4.2-3.5.1") ) flag++;
    if ( rpm_check(release:"SUSE11.2", reference:"git-arch-1.6.4.2-3.5.1") ) flag++;
    if ( rpm_check(release:"SUSE11.2", reference:"git-core-1.6.4.2-3.5.1") ) flag++;
    if ( rpm_check(release:"SUSE11.2", reference:"git-cvs-1.6.4.2-3.5.1") ) flag++;
    if ( rpm_check(release:"SUSE11.2", reference:"git-daemon-1.6.4.2-3.5.1") ) flag++;
    if ( rpm_check(release:"SUSE11.2", reference:"git-email-1.6.4.2-3.5.1") ) flag++;
    if ( rpm_check(release:"SUSE11.2", reference:"git-gui-1.6.4.2-3.5.1") ) flag++;
    if ( rpm_check(release:"SUSE11.2", reference:"git-svn-1.6.4.2-3.5.1") ) flag++;
    if ( rpm_check(release:"SUSE11.2", reference:"git-web-1.6.4.2-3.5.1") ) flag++;
    if ( rpm_check(release:"SUSE11.2", reference:"gitk-1.6.4.2-3.5.1") ) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:rpm_report_get());
      else security_hole(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "git / git-arch / git-core / git-cvs / git-daemon / git-email / etc");
    }
    
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2010-15534.NASL
    descriptionThis fixes a security issue where a special crafted .git file could cause arbitrary code execution (CVE-2010-2542). 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.
    last seen2020-06-01
    modified2020-06-02
    plugin id49821
    published2010-10-11
    reporterThis script is Copyright (C) 2010-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/49821
    titleFedora 13 : cgit-0.8.2.1-4.fc13 (2010-15534)
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-2114.NASL
    descriptionThe Debian stable point release 5.0.6 included updated packages of the Git revision control system in order to fix a security issue. Unfortunately, the update introduced a regression which could make it impossible to clone or create Git repositories. This upgrade fixes this regression, which is tracked as Debian bug #595728. The original security issue allowed an attacker to execute arbitrary code if he could trick a local user to execute a git command in a crafted working directory (CVE-2010-2542 ).
    last seen2020-06-01
    modified2020-06-02
    plugin id49676
    published2010-09-27
    reporterThis script is Copyright (C) 2010-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/49676
    titleDebian DSA-2114-1 : git-core - buffer overflow
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2010-15501.NASL
    descriptionThis fixes a security issue where a special crafted .git file could cause arbitrary code execution (CVE-2010-2542). 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.
    last seen2020-06-01
    modified2020-06-02
    plugin id49818
    published2010-10-11
    reporterThis script is Copyright (C) 2010-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/49818
    titleFedora 12 : cgit-0.8.2.1-4.fc12 (2010-15501)
  • NASL familyMandriva Local Security Checks
    NASL idMANDRIVA_MDVSA-2010-194.NASL
    descriptionA vulnerability has been found and corrected in git : Stack-based buffer overflow in the is_git_directory function in setup.c in Git before 1.7.2.1 allows local users to gain privileges via a long gitdir: field in a .git file in a working copy (CVE-2010-2542). The updated packages have been patched to correct this issue.
    last seen2020-06-01
    modified2020-06-02
    plugin id49741
    published2010-10-06
    reporterThis script is Copyright (C) 2010-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/49741
    titleMandriva Linux Security Advisory : git (MDVSA-2010:194)