Vulnerabilities > CVE-2007-4129 - Link Following vulnerability in Fedoraproject Coolkey 1.1.0

047910
CVSS 3.3 - LOW
Attack vector
LOCAL
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
PARTIAL
Availability impact
PARTIAL

Summary

CoolKey 1.1.0 allows local users to overwrite arbitrary files via a symlink attack on temporary files in the /tmp/.pk11ipc1/ directory.

Vulnerable Configurations

Part Description Count
OS
Redhat
3
Application
Fedoraproject
1

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Symlink Attack
    An attacker positions a symbolic link in such a manner that the targeted user or application accesses the link's endpoint, assuming that it is accessing a file with the link's name. The endpoint file may be either output or input. If the file is output, the result is that the endpoint is modified, instead of a file at the intended location. Modifications to the endpoint file may include appending, overwriting, corrupting, changing permissions, or other modifications. In some variants of this attack the attacker may be able to control the change to a file while in other cases they cannot. The former is especially damaging since the attacker may be able to grant themselves increased privileges or insert false information, but the latter can also be damaging as it can expose sensitive information or corrupt or destroy vital system or application files. Alternatively, the endpoint file may serve as input to the targeted application. This can be used to feed malformed input into the target or to cause the target to process different information, possibly allowing the attacker to control the actions of the target or to cause the target to expose information to the attacker. Moreover, the actions taken on the endpoint file are undertaken with the permissions of the targeted user or application, which may exceed the permissions that the attacker would normally have.
  • Accessing, Modifying or Executing Executable Files
    An attack of this type exploits a system's configuration that allows an attacker to either directly access an executable file, for example through shell access; or in a possible worst case allows an attacker to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.
  • Leverage Executable Code in Non-Executable Files
    An attack of this type exploits a system's trust in configuration and resource files, when the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high. The attack can be directed at a client system, such as causing buffer overrun through loading seemingly benign image files, as in Microsoft Security Bulletin MS04-028 where specially crafted JPEG files could cause a buffer overrun once loaded into the browser. Another example targets clients reading pdf files. In this case the attacker simply appends javascript to the end of a legitimate url for a pdf (http://www.gnucitizen.org/blog/danger-danger-danger/) http://path/to/pdf/file.pdf#whatever_name_you_want=javascript:your_code_here The client assumes that they are reading a pdf, but the attacker has modified the resource and loaded executable javascript into the client's browser process. The attack can also target server processes. The attacker edits the resource or configuration file, for example a web.xml file used to configure security permissions for a J2EE app server, adding role name "public" grants all users with the public role the ability to use the administration functionality. The server trusts its configuration file to be correct, but when they are manipulated, the attacker gains full control.
  • Manipulating Input to File System Calls
    An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.

Nessus

  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2007-0631.NASL
    descriptionUpdated coolkey packages that fix a security issue and various bugs are now available for Red Hat Enterprise Linux 5. This update has been rated as having low security impact by the Red Hat Security Response Team. coolkey contains the driver support for the CoolKey and Common Access Card (CAC) Smart Card products. The CAC is used by the U.S. Government. Steve Grubb discovered a flaw in the way coolkey created a temporary directory. A local attacker could perform a symlink attack and cause arbitrary files to be overwritten. (CVE-2007-4129) In addition, the updated packages contain fixes for the following bugs in the CAC Smart Card support : * CAC Smart Cards can have from 1 to 3 certificates. The coolkey driver, however, was not recognizing cards if they had less than 3 certificates. * logging into a CAC Smart Card token with a new application would cause other, already authenticated, applications to lose their login status unless the Smart Card was then removed from the reader and re-inserted. All CAC users should upgrade to these updated packages, which resolve these issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id27832
    published2007-11-08
    reporterThis script is Copyright (C) 2007-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/27832
    titleRHEL 5 : coolkey (RHSA-2007:0631)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Red Hat Security Advisory RHSA-2007:0631. The text 
    # itself is copyright (C) Red Hat, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(27832);
      script_version ("1.22");
      script_cvs_date("Date: 2019/10/25 13:36:12");
    
      script_cve_id("CVE-2007-4129");
      script_xref(name:"RHSA", value:"2007:0631");
    
      script_name(english:"RHEL 5 : coolkey (RHSA-2007:0631)");
      script_summary(english:"Checks the rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Red Hat host is missing one or more security updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Updated coolkey packages that fix a security issue and various bugs
    are now available for Red Hat Enterprise Linux 5.
    
    This update has been rated as having low security impact by the Red
    Hat Security Response Team.
    
    coolkey contains the driver support for the CoolKey and Common Access
    Card (CAC) Smart Card products. The CAC is used by the U.S.
    Government.
    
    Steve Grubb discovered a flaw in the way coolkey created a temporary
    directory. A local attacker could perform a symlink attack and cause
    arbitrary files to be overwritten. (CVE-2007-4129)
    
    In addition, the updated packages contain fixes for the following bugs
    in the CAC Smart Card support :
    
    * CAC Smart Cards can have from 1 to 3 certificates. The coolkey
    driver, however, was not recognizing cards if they had less than 3
    certificates.
    
    * logging into a CAC Smart Card token with a new application would
    cause other, already authenticated, applications to lose their login
    status unless the Smart Card was then removed from the reader and
    re-inserted.
    
    All CAC users should upgrade to these updated packages, which resolve
    these issues."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2007-4129"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/errata/RHSA-2007:0631"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected coolkey and / or coolkey-devel packages."
      );
      script_set_cvss_base_vector("CVSS2#AV:L/AC:M/Au:N/C:N/I:P/A:P");
      script_cwe_id(59);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:coolkey");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:coolkey-devel");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:5");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2007/11/08");
      script_set_attribute(attribute:"patch_publication_date", value:"2007/11/07");
      script_set_attribute(attribute:"plugin_publication_date", value:"2007/11/08");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2007-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Red Hat Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/RedHat/release", "Host/RedHat/rpm-list", "Host/cpu");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.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) || "Red Hat" >!< release) audit(AUDIT_OS_NOT, "Red Hat");
    os_ver = pregmatch(pattern: "Red Hat Enterprise Linux.*release ([0-9]+(\.[0-9]+)?)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Red Hat");
    os_ver = os_ver[1];
    if (! preg(pattern:"^5([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Red Hat 5.x", "Red Hat " + 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$" && "s390" >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Red Hat", cpu);
    
    yum_updateinfo = get_kb_item("Host/RedHat/yum-updateinfo");
    if (!empty_or_null(yum_updateinfo)) 
    {
      rhsa = "RHSA-2007:0631";
      yum_report = redhat_generate_yum_updateinfo_report(rhsa:rhsa);
      if (!empty_or_null(yum_report))
      {
        security_report_v4(
          port       : 0,
          severity   : SECURITY_NOTE,
          extra      : yum_report 
        );
        exit(0);
      }
      else
      {
        audit_message = "affected by Red Hat security advisory " + rhsa;
        audit(AUDIT_OS_NOT, audit_message);
      }
    }
    else
    {
      flag = 0;
      if (rpm_check(release:"RHEL5", cpu:"i386", reference:"coolkey-1.1.0-5.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"coolkey-1.1.0-5.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"i386", reference:"coolkey-devel-1.1.0-5.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"coolkey-devel-1.1.0-5.el5")) flag++;
    
      if (flag)
      {
        security_report_v4(
          port       : 0,
          severity   : SECURITY_NOTE,
          extra      : rpm_report_get() + redhat_report_package_caveat()
        );
        exit(0);
      }
      else
      {
        tested = pkg_tests_get();
        if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
        else audit(AUDIT_PACKAGE_NOT_INSTALLED, "coolkey / coolkey-devel");
      }
    }
    
  • NASL familyScientific Linux Local Security Checks
    NASL idSL_20071107_COOLKEY_ON_SL5_X.NASL
    descriptionSteve Grubb discovered a flaw in the way coolkey created a temporary directory. A local attacker could perform a symlink attack and cause arbitrary files to be overwritten. (CVE-2007-4129) In addition, the updated packages contain fixes for the following bugs in the CAC Smart Card support : - CAC Smart Cards can have from 1 to 3 certificates. The coolkey driver, however, was not recognizing cards if they had less than 3 certificates. - logging into a CAC Smart Card token with a new application would cause other, already authenticated, applications to lose their login status unless the Smart Card was then removed from the reader and re-inserted
    last seen2020-06-01
    modified2020-06-02
    plugin id60285
    published2012-08-01
    reporterThis script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/60285
    titleScientific Linux Security Update : coolkey on SL5.x i386/x86_64
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text is (C) Scientific Linux.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(60285);
      script_version("1.4");
      script_cvs_date("Date: 2019/10/25 13:36:17");
    
      script_cve_id("CVE-2007-4129");
    
      script_name(english:"Scientific Linux Security Update : coolkey on SL5.x i386/x86_64");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Scientific Linux host is missing one or more security
    updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Steve Grubb discovered a flaw in the way coolkey created a temporary
    directory. A local attacker could perform a symlink attack and cause
    arbitrary files to be overwritten. (CVE-2007-4129)
    
    In addition, the updated packages contain fixes for the following bugs
    in the CAC Smart Card support :
    
      - CAC Smart Cards can have from 1 to 3 certificates. The
        coolkey driver, however, was not recognizing cards if
        they had less than 3 certificates.
    
      - logging into a CAC Smart Card token with a new
        application would cause other, already authenticated,
        applications to lose their login status unless the Smart
        Card was then removed from the reader and re-inserted"
      );
      # https://listserv.fnal.gov/scripts/wa.exe?A2=ind0711&L=scientific-linux-errata&T=0&P=1410
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?125776d1"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected coolkey and / or coolkey-devel packages."
      );
      script_set_cvss_base_vector("CVSS2#AV:L/AC:M/Au:N/C:N/I:P/A:P");
      script_cwe_id(59);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"x-cpe:/o:fermilab:scientific_linux");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2007/11/07");
      script_set_attribute(attribute:"plugin_publication_date", value:"2012/08/01");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Scientific Linux Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/cpu", "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) || "Scientific Linux " >!< release) audit(AUDIT_HOST_NOT, "running Scientific Linux");
    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 (cpu >!< "x86_64" && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Scientific Linux", cpu);
    
    
    flag = 0;
    if (rpm_check(release:"SL5", reference:"coolkey-1.1.0-5.el5")) flag++;
    if (rpm_check(release:"SL5", reference:"coolkey-devel-1.1.0-5.el5")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_note(port:0, extra:rpm_report_get());
      else security_note(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    

Oval

accepted2013-04-29T04:13:53.255-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 5
    ovaloval:org.mitre.oval:def:11414
  • commentThe operating system installed on the system is CentOS Linux 5.x
    ovaloval:org.mitre.oval:def:15802
  • commentOracle Linux 5.x
    ovaloval:org.mitre.oval:def:15459
descriptionCoolKey 1.1.0 allows local users to overwrite arbitrary files via a symlink attack on temporary files in the /tmp/.pk11ipc1/ directory.
familyunix
idoval:org.mitre.oval:def:11413
statusaccepted
submitted2010-07-09T03:56:16-04:00
titleCoolKey 1.1.0 allows local users to overwrite arbitrary files via a symlink attack on temporary files in the /tmp/.pk11ipc1/ directory.
version18

Redhat

advisories
bugzilla
id251774
titleCVE-2007-4129 coolkey file and directory permission flaw
oval
OR
  • commentRed Hat Enterprise Linux must be installed
    ovaloval:com.redhat.rhba:tst:20070304026
  • AND
    • commentRed Hat Enterprise Linux 5 is installed
      ovaloval:com.redhat.rhba:tst:20070331005
    • OR
      • AND
        • commentcoolkey-devel is earlier than 0:1.1.0-5.el5
          ovaloval:com.redhat.rhsa:tst:20070631001
        • commentcoolkey-devel is signed with Red Hat redhatrelease key
          ovaloval:com.redhat.rhsa:tst:20070631002
      • AND
        • commentcoolkey is earlier than 0:1.1.0-5.el5
          ovaloval:com.redhat.rhsa:tst:20070631003
        • commentcoolkey is signed with Red Hat redhatrelease key
          ovaloval:com.redhat.rhsa:tst:20070631004
rhsa
idRHSA-2007:0631
released2007-11-07
severityLow
titleRHSA-2007:0631: coolkey security and bug fix update (Low)
rpms
  • coolkey-0:1.1.0-5.el5
  • coolkey-debuginfo-0:1.1.0-5.el5
  • coolkey-devel-0:1.1.0-5.el5

Seebug

bulletinFamilyexploit
descriptionBUGTRAQ ID: 26369 CVE(CAN) ID: CVE-2007-4129 CoolKey是PKI解决方案的一部分,提供智能卡登录、单点登录、安全邮件访问等服务。 CoolKey在不安全的方式创建临时文件,本地攻击者可能利用此漏洞覆盖系统文件。 CoolKey以完全可写的权限创建/tmp/.pk11ipc1临时目录,该目录中的文件也是完全可写的,因此本地攻击者可以执行符号链接攻击导致覆盖任意文件。 CoolKey CoolKey 1.0.1 CoolKey CoolKey 1.0 RedHat ------ RedHat已经为此发布了一个安全公告(RHSA-2007:0631-04)以及相应补丁: RHSA-2007:0631-04:Low: coolkey security and bug fix update 链接:<a href="https://www.redhat.com/support/errata/RHSA-2007-0631.html" target="_blank">https://www.redhat.com/support/errata/RHSA-2007-0631.html</a> CoolKey ------- 目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载: <a href="http://directory.fedora.redhat.com/download/coolkey/coolkey-1.1.0.tar._gz" target="_blank">http://directory.fedora.redhat.com/download/coolkey/coolkey-1.1.0.tar._gz</a>
idSSV:2400
last seen2017-11-19
modified2007-11-09
published2007-11-09
reporterRoot
sourcehttps://www.seebug.org/vuldb/ssvid-2400
titleCoolKey以不安全的方式创建PK11IPC1临时文件漏洞