Vulnerabilities > CVE-2014-5263 - Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability in Qemu 1.6.0

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

Summary

vmstate_xhci_event in hw/usb/hcd-xhci.c in QEMU 1.6.0 does not terminate the list with the VMSTATE_END_OF_LIST macro, which allows attackers to cause a denial of service (out-of-bounds access, infinite loop, and memory corruption) and possibly gain privileges via unspecified vectors.

Vulnerable Configurations

Part Description Count
Application
Qemu
1

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 idMANDRIVA_MDVSA-2014-220.NASL
    descriptionUpdated qemu packages fix security vulnerabilities : Michael S. Tsirkin discovered that QEMU incorrectly handled vmxnet3 devices. A local guest could possibly use this issue to cause a denial of service, or possibly execute arbitrary code on the host (CVE-2013-4544). Multiple integer overflow, input validation, logic error, and buffer overflow flaws were discovered in various QEMU block drivers. An attacker able to modify a disk image file loaded by a guest could use these flaws to crash the guest, or corrupt QEMU process memory on the host, potentially resulting in arbitrary code execution on the host with the privileges of the QEMU process (CVE-2014-0143, CVE-2014-0144, CVE-2014-0145, CVE-2014-0147). A buffer overflow flaw was found in the way the virtio_net_handle_mac() function of QEMU processed guest requests to update the table of MAC addresses. A privileged guest user could use this flaw to corrupt QEMU process memory on the host, potentially resulting in arbitrary code execution on the host with the privileges of the QEMU process (CVE-2014-0150). A divide-by-zero flaw was found in the seek_to_sector() function of the parallels block driver in QEMU. An attacker able to modify a disk image file loaded by a guest could use this flaw to crash the guest (CVE-2014-0142). A NULL pointer dereference flaw was found in the QCOW2 block driver in QEMU. An attacker able to modify a disk image file loaded by a guest could use this flaw to crash the guest (CVE-2014-0146). It was found that the block driver for Hyper-V VHDX images did not correctly calculate BAT (Block Allocation Table) entries due to a missing bounds check. An attacker able to modify a disk image file loaded by a guest could use this flaw to crash the guest (CVE-2014-0148). An out-of-bounds memory access flaw was found in the way QEMU
    last seen2020-06-01
    modified2020-06-02
    plugin id79407
    published2014-11-23
    reporterThis script is Copyright (C) 2014-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/79407
    titleMandriva Linux Security Advisory : qemu (MDVSA-2014:220)
    code
    #%NASL_MIN_LEVEL 80502
    
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Mandriva Linux Security Advisory MDVSA-2014:220. 
    # The text itself is copyright (C) Mandriva S.A.
    #
    
    if (NASL_LEVEL < 3000) exit(0);
    
    include("compat.inc");
    
    if (description)
    {
      script_id(79407);
      script_version("1.3");
      script_cvs_date("Date: 2019/08/02 13:32:56");
    
      script_cve_id("CVE-2013-4148", "CVE-2013-4149", "CVE-2013-4150", "CVE-2013-4151", "CVE-2013-4526", "CVE-2013-4527", "CVE-2013-4529", "CVE-2013-4530", "CVE-2013-4531", "CVE-2013-4533", "CVE-2013-4534", "CVE-2013-4535", "CVE-2013-4536", "CVE-2013-4537", "CVE-2013-4538", "CVE-2013-4539", "CVE-2013-4540", "CVE-2013-4541", "CVE-2013-4542", "CVE-2013-6399", "CVE-2014-0142", "CVE-2014-0143", "CVE-2014-0144", "CVE-2014-0145", "CVE-2014-0146", "CVE-2014-0147", "CVE-2014-0148", "CVE-2014-0150", "CVE-2014-0182", "CVE-2014-0222", "CVE-2014-0223", "CVE-2014-3461", "CVE-2014-3615", "CVE-2014-3640", "CVE-2014-3689", "CVE-2014-5263", "CVE-2014-7815");
      script_bugtraq_id(66464, 66472, 66480, 66481, 66483, 66484, 66486, 66821, 66976, 67357, 67391, 67392, 67394, 67483, 69247, 69654, 70237, 70997, 70998);
      script_xref(name:"MDVSA", value:"2014:220");
    
      script_name(english:"Mandriva Linux Security Advisory : qemu (MDVSA-2014:220)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Mandriva Linux host is missing one or more security
    updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Updated qemu packages fix security vulnerabilities :
    
    Michael S. Tsirkin discovered that QEMU incorrectly handled vmxnet3
    devices. A local guest could possibly use this issue to cause a denial
    of service, or possibly execute arbitrary code on the host
    (CVE-2013-4544).
    
    Multiple integer overflow, input validation, logic error, and buffer
    overflow flaws were discovered in various QEMU block drivers. An
    attacker able to modify a disk image file loaded by a guest could use
    these flaws to crash the guest, or corrupt QEMU process memory on the
    host, potentially resulting in arbitrary code execution on the host
    with the privileges of the QEMU process (CVE-2014-0143, CVE-2014-0144,
    CVE-2014-0145, CVE-2014-0147).
    
    A buffer overflow flaw was found in the way the
    virtio_net_handle_mac() function of QEMU processed guest requests to
    update the table of MAC addresses. A privileged guest user could use
    this flaw to corrupt QEMU process memory on the host, potentially
    resulting in arbitrary code execution on the host with the privileges
    of the QEMU process (CVE-2014-0150).
    
    A divide-by-zero flaw was found in the seek_to_sector() function of
    the parallels block driver in QEMU. An attacker able to modify a disk
    image file loaded by a guest could use this flaw to crash the guest
    (CVE-2014-0142).
    
    A NULL pointer dereference flaw was found in the QCOW2 block driver in
    QEMU. An attacker able to modify a disk image file loaded by a guest
    could use this flaw to crash the guest (CVE-2014-0146).
    
    It was found that the block driver for Hyper-V VHDX images did not
    correctly calculate BAT (Block Allocation Table) entries due to a
    missing bounds check. An attacker able to modify a disk image file
    loaded by a guest could use this flaw to crash the guest
    (CVE-2014-0148).
    
    An out-of-bounds memory access flaw was found in the way QEMU's IDE
    device driver handled the execution of SMART EXECUTE OFFLINE commands.
    A privileged guest user could use this flaw to corrupt QEMU process
    memory on the host, which could potentially result in arbitrary code
    execution on the host with the privileges of the QEMU process
    (CVE-2014-2894).
    
    Two integer overflow flaws were found in the QEMU block driver for
    QCOW version 1 disk images. A user able to alter the QEMU disk image
    files loaded by a guest could use either of these flaws to corrupt
    QEMU process memory on the host, which could potentially result in
    arbitrary code execution on the host with the privileges of the QEMU
    process (CVE-2014-0222, CVE-2014-0223).
    
    Multiple buffer overflow, input validation, and out-of-bounds write
    flaws were found in the way the virtio, virtio-net, virtio-scsi, and
    usb drivers of QEMU handled state loading after migration. A user able
    to alter the savevm data (either on the disk or over the wire during
    migration) could use either of these flaws to corrupt QEMU process
    memory on the (destination) host, which could potentially result in
    arbitrary code execution on the host with the privileges of the QEMU
    process (CVE-2013-4148, CVE-2013-4151, CVE-2013-4535, CVE-2013-4536,
    CVE-2013-4541, CVE-2013-4542, CVE-2013-6399, CVE-2014-0182,
    CVE-2014-3461).
    
    An information leak flaw was found in the way QEMU's VGA emulator
    accessed frame buffer memory for high resolution displays. A
    privileged guest user could use this flaw to leak memory contents of
    the host to the guest by setting the display to use a high resolution
    in the guest (CVE-2014-3615).
    
    When guest sends udp packet with source port and source addr 0,
    uninitialized socket is picked up when looking for matching and
    already created udp sockets, and later passed to sosendto() where NULL
    pointer dereference is hit during so->slirp->vnetwork_mask.s_addr
    access Only guests using qemu user networking are affected
    (CVE-2014-3640).
    
    The Advanced Threat Research team at Intel Security reported that
    guest provided parameter were insufficiently validated in rectangle
    functions in the vmware-vga driver. A privileged guest user could use
    this flaw to write into qemu address space on the host, potentially
    escalating their privileges to those of the qemu host process
    (CVE-2014-3689).
    
    It was discovered that QEMU incorrectly handled USB xHCI controller
    live migration. An attacker could possibly use this issue to cause a
    denial of service, or possibly execute arbitrary code (CVE-2014-5263).
    
    James Spadaro of Cisco reported insufficiently sanitized
    bits_per_pixel from the client in the QEMU VNC display driver. An
    attacker having access to the guest's VNC console could use this flaw
    to crash the guest (CVE-2014-7815).
    
    Additionally qemu-1.6+ requires usbredir-0.6+ for USB redirection
    support which is also being provided with this advisory."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://advisories.mageia.org/MGASA-2014-0426.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://advisories.mageia.org/MGASA-2014-0467.html"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      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:mandriva:linux:lib64usbredirhost-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:lib64usbredirhost1");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:lib64usbredirparser-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:lib64usbredirparser1");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:qemu");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:qemu-img");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:usbredir");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:usbredir-devel");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:mandriva:business_server:1");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2014/11/21");
      script_set_attribute(attribute:"plugin_publication_date", value:"2014/11/23");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2014-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:"MDK-MBS1", cpu:"x86_64", reference:"lib64usbredirhost-devel-0.7-1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"lib64usbredirhost1-0.7-1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"lib64usbredirparser-devel-0.7-1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"lib64usbredirparser1-0.7-1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"qemu-1.6.2-1.1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"qemu-img-1.6.2-1.1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"usbredir-0.7-1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"usbredir-devel-0.7-1.mbs1")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:rpm_report_get());
      else security_hole(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-201412-01.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-201412-01 (QEMU: Multiple Vulnerabilities) Multiple vulnerabilities have been discovered in QEMU. Please review the CVE identifiers referenced below for details. Impact : A context-dependent attacker could cause a Denial of Service condition and a local user can obtain sensitive information. Workaround : There is no known workaround at this time.
    last seen2020-06-01
    modified2020-06-02
    plugin id79811
    published2014-12-09
    reporterThis script is Copyright (C) 2014-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/79811
    titleGLSA-201412-01 : QEMU: Multiple Vulnerabilities
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Gentoo Linux Security Advisory GLSA 201412-01.
    #
    # 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(79811);
      script_version("1.5");
      script_cvs_date("Date: 2018/12/05 20:31:22");
    
      script_cve_id("CVE-2014-3471", "CVE-2014-3615", "CVE-2014-3640", "CVE-2014-5263", "CVE-2014-5388", "CVE-2014-7815");
      script_bugtraq_id(68145, 69247, 69356, 69654, 70237, 70998);
      script_xref(name:"GLSA", value:"201412-01");
    
      script_name(english:"GLSA-201412-01 : QEMU: Multiple Vulnerabilities");
      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-201412-01
    (QEMU: Multiple Vulnerabilities)
    
        Multiple vulnerabilities have been discovered in QEMU. Please review the
          CVE identifiers referenced below for details.
      
    Impact :
    
        A context-dependent attacker could cause a Denial of Service condition
          and a local user can obtain sensitive information.
      
    Workaround :
    
        There is no known workaround at this time."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security.gentoo.org/glsa/201412-01"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "All QEMU users should upgrade to the latest version:
          # emerge --sync
          # emerge --ask --oneshot --verbose '>=app-emulation/qemu-2.1.2-r1'"
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H");
      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:qemu");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:gentoo:linux");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2014/12/08");
      script_set_attribute(attribute:"plugin_publication_date", value:"2014/12/09");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2014-2018 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:"app-emulation/qemu", unaffected:make_list("ge 2.1.2-r1"), vulnerable:make_list("lt 2.1.2-r1"))) 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, "QEMU");
    }
    
  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-2409-1.NASL
    descriptionLaszlo Ersek discovered that QEMU incorrectly handled memory in the vga device. A malicious guest could possibly use this issue to read arbitrary host memory. This issue only affected Ubuntu 14.04 LTS and Ubuntu 14.10. (CVE-2014-3615) Xavier Mehrenberger and Stephane Duverger discovered that QEMU incorrectly handled certain udp packets when using guest networking. A malicious guest could possibly use this issue to cause a denial of service. (CVE-2014-3640) It was discovered that QEMU incorrectly handled parameter validation in the vmware_vga device. A malicious guest could possibly use this issue to write into memory of the host, leading to privilege escalation. (CVE-2014-3689) It was discovered that QEMU incorrectly handled USB xHCI controller live migration. An attacker could possibly use this issue to cause a denial of service, or possibly execute arbitrary code. This issue only affected Ubuntu 14.04 LTS. (CVE-2014-5263) Michael S. Tsirkin discovered that QEMU incorrectly handled memory in the ACPI PCI hotplug interface. A malicious guest could possibly use this issue to access memory of the host, leading to information disclosure or privilege escalation. This issue only affected Ubuntu 14.04 LTS. (CVE-2014-5388) James Spadaro discovered that QEMU incorrectly handled certain VNC bytes_per_pixel values. An attacker having access to a VNC console could possibly use this issue to cause a guest to crash, resulting in a denial of service. (CVE-2014-7815). 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 id79244
    published2014-11-14
    reporterUbuntu Security Notice (C) 2014-2019 Canonical, Inc. / NASL script (C) 2014-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/79244
    titleUbuntu 10.04 LTS / 12.04 LTS / 14.04 LTS / 14.10 : qemu, qemu-kvm vulnerabilities (USN-2409-1)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Ubuntu Security Notice USN-2409-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(79244);
      script_version("1.5");
      script_cvs_date("Date: 2019/09/19 12:54:30");
    
      script_cve_id("CVE-2014-3615", "CVE-2014-3640", "CVE-2014-3689", "CVE-2014-5263", "CVE-2014-5388", "CVE-2014-7815");
      script_xref(name:"USN", value:"2409-1");
    
      script_name(english:"Ubuntu 10.04 LTS / 12.04 LTS / 14.04 LTS / 14.10 : qemu, qemu-kvm vulnerabilities (USN-2409-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:
    "Laszlo Ersek discovered that QEMU incorrectly handled memory in the
    vga device. A malicious guest could possibly use this issue to read
    arbitrary host memory. This issue only affected Ubuntu 14.04 LTS and
    Ubuntu 14.10. (CVE-2014-3615)
    
    Xavier Mehrenberger and Stephane Duverger discovered that QEMU
    incorrectly handled certain udp packets when using guest networking. A
    malicious guest could possibly use this issue to cause a denial of
    service. (CVE-2014-3640)
    
    It was discovered that QEMU incorrectly handled parameter validation
    in the vmware_vga device. A malicious guest could possibly use this
    issue to write into memory of the host, leading to privilege
    escalation. (CVE-2014-3689)
    
    It was discovered that QEMU incorrectly handled USB xHCI controller
    live migration. An attacker could possibly use this issue to cause a
    denial of service, or possibly execute arbitrary code. This issue only
    affected Ubuntu 14.04 LTS. (CVE-2014-5263)
    
    Michael S. Tsirkin discovered that QEMU incorrectly handled memory in
    the ACPI PCI hotplug interface. A malicious guest could possibly use
    this issue to access memory of the host, leading to information
    disclosure or privilege escalation. This issue only affected Ubuntu
    14.04 LTS. (CVE-2014-5388)
    
    James Spadaro discovered that QEMU incorrectly handled certain VNC
    bytes_per_pixel values. An attacker having access to a VNC console
    could possibly use this issue to cause a guest to crash, resulting in
    a denial of service. (CVE-2014-7815).
    
    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:"see_also",
        value:"https://usn.ubuntu.com/2409-1/"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:L/AC:L/Au:N/C:C/I:C/A:C");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:qemu-kvm");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:qemu-system");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:qemu-system-aarch64");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:qemu-system-arm");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:qemu-system-mips");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:qemu-system-misc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:qemu-system-ppc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:qemu-system-sparc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:qemu-system-x86");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:10.04:-:lts");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:12.04:-:lts");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:14.04");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:14.10");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2014/08/26");
      script_set_attribute(attribute:"patch_publication_date", value:"2014/11/13");
      script_set_attribute(attribute:"plugin_publication_date", value:"2014/11/14");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"Ubuntu Security Notice (C) 2014-2019 Canonical, Inc. / NASL script (C) 2014-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      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 (! preg(pattern:"^(10\.04|12\.04|14\.04|14\.10)$", string:release)) audit(AUDIT_OS_NOT, "Ubuntu 10.04 / 12.04 / 14.04 / 14.10", "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:"10.04", pkgname:"qemu-kvm", pkgver:"0.12.3+noroms-0ubuntu9.25")) flag++;
    if (ubuntu_check(osver:"12.04", pkgname:"qemu-kvm", pkgver:"1.0+noroms-0ubuntu14.19")) flag++;
    if (ubuntu_check(osver:"14.04", pkgname:"qemu-system", pkgver:"2.0.0+dfsg-2ubuntu1.7")) flag++;
    if (ubuntu_check(osver:"14.04", pkgname:"qemu-system-aarch64", pkgver:"2.0.0+dfsg-2ubuntu1.7")) flag++;
    if (ubuntu_check(osver:"14.04", pkgname:"qemu-system-arm", pkgver:"2.0.0+dfsg-2ubuntu1.7")) flag++;
    if (ubuntu_check(osver:"14.04", pkgname:"qemu-system-mips", pkgver:"2.0.0+dfsg-2ubuntu1.7")) flag++;
    if (ubuntu_check(osver:"14.04", pkgname:"qemu-system-misc", pkgver:"2.0.0+dfsg-2ubuntu1.7")) flag++;
    if (ubuntu_check(osver:"14.04", pkgname:"qemu-system-ppc", pkgver:"2.0.0+dfsg-2ubuntu1.7")) flag++;
    if (ubuntu_check(osver:"14.04", pkgname:"qemu-system-sparc", pkgver:"2.0.0+dfsg-2ubuntu1.7")) flag++;
    if (ubuntu_check(osver:"14.04", pkgname:"qemu-system-x86", pkgver:"2.0.0+dfsg-2ubuntu1.7")) flag++;
    if (ubuntu_check(osver:"14.10", pkgname:"qemu-system", pkgver:"2.1+dfsg-4ubuntu6.1")) flag++;
    if (ubuntu_check(osver:"14.10", pkgname:"qemu-system-aarch64", pkgver:"2.1+dfsg-4ubuntu6.1")) flag++;
    if (ubuntu_check(osver:"14.10", pkgname:"qemu-system-arm", pkgver:"2.1+dfsg-4ubuntu6.1")) flag++;
    if (ubuntu_check(osver:"14.10", pkgname:"qemu-system-mips", pkgver:"2.1+dfsg-4ubuntu6.1")) flag++;
    if (ubuntu_check(osver:"14.10", pkgname:"qemu-system-misc", pkgver:"2.1+dfsg-4ubuntu6.1")) flag++;
    if (ubuntu_check(osver:"14.10", pkgname:"qemu-system-ppc", pkgver:"2.1+dfsg-4ubuntu6.1")) flag++;
    if (ubuntu_check(osver:"14.10", pkgname:"qemu-system-sparc", pkgver:"2.1+dfsg-4ubuntu6.1")) flag++;
    if (ubuntu_check(osver:"14.10", pkgname:"qemu-system-x86", pkgver:"2.1+dfsg-4ubuntu6.1")) flag++;
    
    if (flag)
    {
      security_report_v4(
        port       : 0,
        severity   : SECURITY_HOLE,
        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, "qemu-kvm / qemu-system / qemu-system-aarch64 / qemu-system-arm / etc");
    }
    
  • NASL familyMandriva Local Security Checks
    NASL idMANDRIVA_MDVSA-2015-061.NASL
    descriptionUpdated qemu packages fix multiple security vulnerabilities : Sibiao Luo discovered that QEMU incorrectly handled device hot-unplugging. A local user could possibly use this flaw to cause a denial of service (CVE-2013-4377). Michael S. Tsirkin discovered that QEMU incorrectly handled vmxnet3 devices. A local guest could possibly use this issue to cause a denial of service, or possibly execute arbitrary code on the host (CVE-2013-4544). Multiple integer overflow, input validation, logic error, and buffer overflow flaws were discovered in various QEMU block drivers. An attacker able to modify a disk image file loaded by a guest could use these flaws to crash the guest, or corrupt QEMU process memory on the host, potentially resulting in arbitrary code execution on the host with the privileges of the QEMU process (CVE-2014-0143, CVE-2014-0144, CVE-2014-0145, CVE-2014-0147). A buffer overflow flaw was found in the way the virtio_net_handle_mac() function of QEMU processed guest requests to update the table of MAC addresses. A privileged guest user could use this flaw to corrupt QEMU process memory on the host, potentially resulting in arbitrary code execution on the host with the privileges of the QEMU process (CVE-2014-0150). A divide-by-zero flaw was found in the seek_to_sector() function of the parallels block driver in QEMU. An attacker able to modify a disk image file loaded by a guest could use this flaw to crash the guest (CVE-2014-0142). A NULL pointer dereference flaw was found in the QCOW2 block driver in QEMU. An attacker able to modify a disk image file loaded by a guest could use this flaw to crash the guest (CVE-2014-0146). It was found that the block driver for Hyper-V VHDX images did not correctly calculate BAT (Block Allocation Table) entries due to a missing bounds check. An attacker able to modify a disk image file loaded by a guest could use this flaw to crash the guest (CVE-2014-0148). An out-of-bounds memory access flaw was found in the way QEMU
    last seen2020-06-01
    modified2020-06-02
    plugin id81944
    published2015-03-19
    reporterThis script is Copyright (C) 2015-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/81944
    titleMandriva Linux Security Advisory : qemu (MDVSA-2015:061)
    code
    #%NASL_MIN_LEVEL 80502
    
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Mandriva Linux Security Advisory MDVSA-2015:061. 
    # The text itself is copyright (C) Mandriva S.A.
    #
    
    if (NASL_LEVEL < 3000) exit(0);
    
    include("compat.inc");
    
    if (description)
    {
      script_id(81944);
      script_version("1.3");
      script_cvs_date("Date: 2019/08/02 13:32:56");
    
      script_cve_id("CVE-2013-4148", "CVE-2013-4149", "CVE-2013-4150", "CVE-2013-4151", "CVE-2013-4377", "CVE-2013-4526", "CVE-2013-4527", "CVE-2013-4529", "CVE-2013-4530", "CVE-2013-4531", "CVE-2013-4533", "CVE-2013-4534", "CVE-2013-4535", "CVE-2013-4536", "CVE-2013-4537", "CVE-2013-4538", "CVE-2013-4539", "CVE-2013-4540", "CVE-2013-4541", "CVE-2013-4542", "CVE-2013-6399", "CVE-2014-0142", "CVE-2014-0143", "CVE-2014-0144", "CVE-2014-0145", "CVE-2014-0146", "CVE-2014-0147", "CVE-2014-0148", "CVE-2014-0150", "CVE-2014-0182", "CVE-2014-0222", "CVE-2014-0223", "CVE-2014-3461", "CVE-2014-3615", "CVE-2014-3640", "CVE-2014-3689", "CVE-2014-5263", "CVE-2014-7815", "CVE-2014-7840", "CVE-2014-8106");
      script_xref(name:"MDVSA", value:"2015:061");
    
      script_name(english:"Mandriva Linux Security Advisory : qemu (MDVSA-2015:061)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Mandriva Linux host is missing one or more security
    updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Updated qemu packages fix multiple security vulnerabilities :
    
    Sibiao Luo discovered that QEMU incorrectly handled device
    hot-unplugging. A local user could possibly use this flaw to cause a
    denial of service (CVE-2013-4377).
    
    Michael S. Tsirkin discovered that QEMU incorrectly handled vmxnet3
    devices. A local guest could possibly use this issue to cause a denial
    of service, or possibly execute arbitrary code on the host
    (CVE-2013-4544).
    
    Multiple integer overflow, input validation, logic error, and buffer
    overflow flaws were discovered in various QEMU block drivers. An
    attacker able to modify a disk image file loaded by a guest could use
    these flaws to crash the guest, or corrupt QEMU process memory on the
    host, potentially resulting in arbitrary code execution on the host
    with the privileges of the QEMU process (CVE-2014-0143, CVE-2014-0144,
    CVE-2014-0145, CVE-2014-0147).
    
    A buffer overflow flaw was found in the way the
    virtio_net_handle_mac() function of QEMU processed guest requests to
    update the table of MAC addresses. A privileged guest user could use
    this flaw to corrupt QEMU process memory on the host, potentially
    resulting in arbitrary code execution on the host with the privileges
    of the QEMU process (CVE-2014-0150).
    
    A divide-by-zero flaw was found in the seek_to_sector() function of
    the parallels block driver in QEMU. An attacker able to modify a disk
    image file loaded by a guest could use this flaw to crash the guest
    (CVE-2014-0142).
    
    A NULL pointer dereference flaw was found in the QCOW2 block driver in
    QEMU. An attacker able to modify a disk image file loaded by a guest
    could use this flaw to crash the guest (CVE-2014-0146).
    
    It was found that the block driver for Hyper-V VHDX images did not
    correctly calculate BAT (Block Allocation Table) entries due to a
    missing bounds check. An attacker able to modify a disk image file
    loaded by a guest could use this flaw to crash the guest
    (CVE-2014-0148).
    
    An out-of-bounds memory access flaw was found in the way QEMU's IDE
    device driver handled the execution of SMART EXECUTE OFFLINE commands.
    A privileged guest user could use this flaw to corrupt QEMU process
    memory on the host, which could potentially result in arbitrary code
    execution on the host with the privileges of the QEMU process
    (CVE-2014-2894).
    
    Two integer overflow flaws were found in the QEMU block driver for
    QCOW version 1 disk images. A user able to alter the QEMU disk image
    files loaded by a guest could use either of these flaws to corrupt
    QEMU process memory on the host, which could potentially result in
    arbitrary code execution on the host with the privileges of the QEMU
    process (CVE-2014-0222, CVE-2014-0223).
    
    Multiple buffer overflow, input validation, and out-of-bounds write
    flaws were found in the way the virtio, virtio-net, virtio-scsi, and
    usb drivers of QEMU handled state loading after migration. A user able
    to alter the savevm data (either on the disk or over the wire during
    migration) could use either of these flaws to corrupt QEMU process
    memory on the (destination) host, which could potentially result in
    arbitrary code execution on the host with the privileges of the QEMU
    process (CVE-2013-4148, CVE-2013-4151, CVE-2013-4535, CVE-2013-4536,
    CVE-2013-4541, CVE-2013-4542, CVE-2013-6399, CVE-2014-0182,
    CVE-2014-3461).
    
    An information leak flaw was found in the way QEMU's VGA emulator
    accessed frame buffer memory for high resolution displays. A
    privileged guest user could use this flaw to leak memory contents of
    the host to the guest by setting the display to use a high resolution
    in the guest (CVE-2014-3615).
    
    When guest sends udp packet with source port and source addr 0,
    uninitialized socket is picked up when looking for matching and
    already created udp sockets, and later passed to sosendto() where NULL
    pointer dereference is hit during so->slirp->vnetwork_mask.s_addr
    access Only guests using qemu user networking are affected
    (CVE-2014-3640).
    
    The Advanced Threat Research team at Intel Security reported that
    guest provided parameter were insufficiently validated in rectangle
    functions in the vmware-vga driver. A privileged guest user could use
    this flaw to write into qemu address space on the host, potentially
    escalating their privileges to those of the qemu host process
    (CVE-2014-3689).
    
    It was discovered that QEMU incorrectly handled USB xHCI controller
    live migration. An attacker could possibly use this issue to cause a
    denial of service, or possibly execute arbitrary code (CVE-2014-5263).
    
    James Spadaro of Cisco reported insufficiently sanitized
    bits_per_pixel from the client in the QEMU VNC display driver. An
    attacker having access to the guest's VNC console could use this flaw
    to crash the guest (CVE-2014-7815).
    
    During migration, the values read from migration stream during ram
    load are not validated. Especially offset in host_from_stream_offset()
    and also the length of the writes in the callers of the said function.
    A user able to alter the savevm data (either on the disk or over the
    wire during migration) could use either of these flaws to corrupt QEMU
    process memory on the (destination) host, which could potentially
    result in arbitrary code execution on the host with the privileges of
    the QEMU process (CVE-2014-7840).
    
    Paolo Bonzini of Red Hat discovered that the blit region checks were
    insufficient in the Cirrus VGA emulator in qemu. A privileged guest
    user could use this flaw to write into qemu address space on the host,
    potentially escalating their privileges to those of the qemu host
    process (CVE-2014-8106).
    
    This update also provides usbredirparser 0.6 as a prerequisite of
    qemu-1.6.2"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://advisories.mageia.org/MGASA-2014-0060.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://advisories.mageia.org/MGASA-2014-0426.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://advisories.mageia.org/MGASA-2014-0467.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://advisories.mageia.org/MGASA-2014-0525.html"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected 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:mandriva:linux:lib64usbredirhost-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:lib64usbredirhost1");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:lib64usbredirparser-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:lib64usbredirparser1");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:qemu");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:qemu-img");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:usbredir");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:usbredir-devel");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:mandriva:business_server:2");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2015/03/13");
      script_set_attribute(attribute:"plugin_publication_date", value:"2015/03/19");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2015-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:"MDK-MBS2", cpu:"x86_64", reference:"lib64usbredirhost-devel-0.6-1.mbs2")) flag++;
    if (rpm_check(release:"MDK-MBS2", cpu:"x86_64", reference:"lib64usbredirhost1-0.6-1.mbs2")) flag++;
    if (rpm_check(release:"MDK-MBS2", cpu:"x86_64", reference:"lib64usbredirparser-devel-0.6-1.mbs2")) flag++;
    if (rpm_check(release:"MDK-MBS2", cpu:"x86_64", reference:"lib64usbredirparser1-0.6-1.mbs2")) flag++;
    if (rpm_check(release:"MDK-MBS2", cpu:"x86_64", reference:"qemu-1.6.2-1.mbs2")) flag++;
    if (rpm_check(release:"MDK-MBS2", cpu:"x86_64", reference:"qemu-img-1.6.2-1.mbs2")) flag++;
    if (rpm_check(release:"MDK-MBS2", cpu:"x86_64", reference:"usbredir-0.6-1.mbs2")) flag++;
    if (rpm_check(release:"MDK-MBS2", cpu:"x86_64", reference:"usbredir-devel-0.6-1.mbs2")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:rpm_report_get());
      else security_hole(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");