Vulnerabilities > CVE-2019-12779 - Link Following vulnerability in Clusterlabs Libqb

047910
CVSS 6.6 - MEDIUM
Attack vector
LOCAL
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
COMPLETE
Availability impact
COMPLETE
local
low complexity
clusterlabs
CWE-59
nessus

Summary

libqb before 1.0.5 allows local users to overwrite arbitrary files via a symlink attack, because it uses predictable filenames (under /dev/shm and /tmp) without O_EXCL.

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 familySuSE Local Security Checks
    NASL idOPENSUSE-2019-1752.NASL
    descriptionThis update for libqb fixes the following issue : Security issue fixed:	 - CVE-2019-12779: Fixed an insecure treatment of IPC temporary files which could have allowed a local attacker to overwrite privileged system files (bsc#1137835). This update was imported from the SUSE:SLE-15-SP1:Update update project.
    last seen2020-06-01
    modified2020-06-02
    plugin id126893
    published2019-07-22
    reporterThis script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/126893
    titleopenSUSE Security Update : libqb (openSUSE-2019-1752)
  • NASL familySuSE Local Security Checks
    NASL idOPENSUSE-2019-1718.NASL
    descriptionThis update for libqb fixes the following issues : Security issue fixed : - CVE-2019-12779: Fixed an issue where a local attacker could overwrite privileged system files (bsc#1137835). This update was imported from the SUSE:SLE-15:Update update project.
    last seen2020-06-01
    modified2020-06-02
    plugin id126885
    published2019-07-22
    reporterThis script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/126885
    titleopenSUSE Security Update : libqb (openSUSE-2019-1718)
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2020-1189.NASL
    descriptionThe remote Redhat Enterprise Linux 7 host has packages installed that are affected by a vulnerability as referenced in the RHSA-2020:1189 advisory. - libqb: Insecure treatment of IPC (temporary) files (CVE-2019-12779) Note that Nessus has not tested for this issue but has instead relied only on the application
    last seen2020-04-23
    modified2020-04-01
    plugin id135067
    published2020-04-01
    reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/135067
    titleRHEL 7 : libqb (RHSA-2020:1189)
  • NASL familyCentOS Local Security Checks
    NASL idCENTOS_RHSA-2020-1189.NASL
    descriptionThe remote Redhat Enterprise Linux 7 host has packages installed that are affected by a vulnerability as referenced in the RHSA-2020:1189 advisory. - libqb: Insecure treatment of IPC (temporary) files (CVE-2019-12779) Note that Nessus has not tested for this issue but has instead relied only on the application
    last seen2020-06-06
    modified2020-04-10
    plugin id135357
    published2020-04-10
    reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/135357
    titleCentOS 7 : libqb (CESA-2020:1189)
  • NASL familySuSE Local Security Checks
    NASL idSUSE_SU-2019-1791-1.NASL
    descriptionThis update for libqb fixes the following issue : Security issue fixed : CVE-2019-12779: Fixed an insecure treatment of IPC temporary files which could have allowed a local attacker to overwrite privileged system files (bsc#1137835). Note that Tenable Network Security has extracted the preceding description block directly from the SUSE 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 id126597
    published2019-07-10
    reporterThis script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/126597
    titleSUSE SLED15 / SLES15 Security Update : libqb (SUSE-SU-2019:1791-1)
  • NASL familySuSE Local Security Checks
    NASL idSUSE_SU-2019-1812-1.NASL
    descriptionThis update for libqb fixes the following issues : Security issue fixed : CVE-2019-12779: Fixed an issue where a local attacker could overwrite privileged system files (bsc#1137835). Note that Tenable Network Security has extracted the preceding description block directly from the SUSE 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 id126619
    published2019-07-11
    reporterThis script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/126619
    titleSUSE SLED15 / SLES15 Security Update : libqb (SUSE-SU-2019:1812-1)
  • NASL familyScientific Linux Local Security Checks
    NASL idSL_20200407_LIBQB_ON_SL7_X.NASL
    description* libqb: Insecure treatment of IPC (temporary) files
    last seen2020-04-30
    modified2020-04-21
    plugin id135816
    published2020-04-21
    reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/135816
    titleScientific Linux Security Update : libqb on SL7.x x86_64 (20200407)
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2019-3610.NASL
    descriptionAn update for libqb is now available for Red Hat Enterprise Linux 8. Red Hat Product Security has rated this update as having a security impact of Moderate. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available for each vulnerability from the CVE link(s) in the References section. The libqb packages provide a library with the primary purpose of providing high performance client/server reusable features, such as high performance logging, tracing, inter-process communication, and polling. Security Fix(es) : * libqb: Insecure treatment of IPC (temporary) files (CVE-2019-12779) For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section. Additional Changes : For detailed information on changes in this release, see the Red Hat Enterprise Linux 8.1 Release Notes linked from the References section.
    last seen2020-06-01
    modified2020-06-02
    plugin id130559
    published2019-11-06
    reporterThis script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/130559
    titleRHEL 8 : libqb (RHSA-2019:3610)

Redhat

advisories
  • bugzilla
    id1718773
    titleAvoid libqb deadlock due to not using selected socket poll priority
    oval
    OR
    • commentRed Hat Enterprise Linux must be installed
      ovaloval:com.redhat.rhba:tst:20070304026
    • AND
      • commentRed Hat Enterprise Linux 8 is installed
        ovaloval:com.redhat.rhba:tst:20193384074
      • OR
        • AND
          • commentlibqb-debugsource is earlier than 0:1.0.3-10.el8
            ovaloval:com.redhat.rhsa:tst:20193610001
          • commentlibqb-debugsource is signed with Red Hat redhatrelease2 key
            ovaloval:com.redhat.rhsa:tst:20193610002
        • AND
          • commentlibqb-devel is earlier than 0:1.0.3-10.el8
            ovaloval:com.redhat.rhsa:tst:20193610003
          • commentlibqb-devel is signed with Red Hat redhatrelease2 key
            ovaloval:com.redhat.rhsa:tst:20193610004
        • AND
          • commentlibqb is earlier than 0:1.0.3-10.el8
            ovaloval:com.redhat.rhsa:tst:20193610005
          • commentlibqb is signed with Red Hat redhatrelease2 key
            ovaloval:com.redhat.rhsa:tst:20193610006
    rhsa
    idRHSA-2019:3610
    released2019-11-05
    severityModerate
    titleRHSA-2019:3610: libqb security and bug fix update (Moderate)
  • bugzilla
    id1695948
    titleCVE-2019-12779 libqb: Insecure treatment of IPC (temporary) files
    oval
    OR
    • commentRed Hat Enterprise Linux must be installed
      ovaloval:com.redhat.rhba:tst:20070304026
    • AND
      • commentRed Hat Enterprise Linux 7 is installed
        ovaloval:com.redhat.rhba:tst:20150364027
      • OR
        • AND
          • commentlibqb-devel is earlier than 0:1.0.1-9.el7
            ovaloval:com.redhat.rhsa:tst:20201189001
          • commentlibqb-devel is signed with Red Hat redhatrelease2 key
            ovaloval:com.redhat.rhsa:tst:20193610004
        • AND
          • commentlibqb is earlier than 0:1.0.1-9.el7
            ovaloval:com.redhat.rhsa:tst:20201189003
          • commentlibqb is signed with Red Hat redhatrelease2 key
            ovaloval:com.redhat.rhsa:tst:20193610006
    rhsa
    idRHSA-2020:1189
    released2020-03-31
    severityModerate
    titleRHSA-2020:1189: libqb security update (Moderate)
rpms
  • libqb-0:1.0.3-10.el8
  • libqb-debuginfo-0:1.0.3-10.el8
  • libqb-debugsource-0:1.0.3-10.el8
  • libqb-devel-0:1.0.3-10.el8
  • libqb-tests-debuginfo-0:1.0.3-10.el8
  • libqb-0:1.0.1-9.el7
  • libqb-debuginfo-0:1.0.1-9.el7
  • libqb-devel-0:1.0.1-9.el7