Cloudanix VulnDB

CVE-2017-5884

High · 7.8

CVSS

7.8

EPSS

2.3%

Published

Feb 28, 2017

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in the VNC display library lets a malicious remote server take over a computer when a user connects to view the screen.

Exploit Available
Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Remote Code Execution
Component
Library
Class
Buffer Overflow
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Buffer overflow in gtk-vnc tile decoding path caused by missing bounds checks on src x/y coordinates inside RRE, hextile, and copyrect subrectangle tiles, enabling arbitrary code execution when a client processes a malicious tile.

Why it matters to the business

Compromise of any system that uses the vulnerable VNC client library to connect to an untrusted server, resulting in full host takeover with potential lateral movement and data loss.

How an attack unfolds

An attacker hosts a malicious VNC server that, upon client connection, transmits specially crafted tiles containing out-of-bounds source coordinates; the client library fails to validate the coordinates before memory operations, triggering the overflow and allowing shellcode execution.

How to fix it

Upgrade gtk-vnc to version 0.7.0 or later on all affected systems; rebuild and redistribute any dependent packages that statically link the library.

How to confirm the fix worked

Verify installed gtk-vnc package version is 0.7.0 or newer; run regression tests that exercise RRE, hextile, and copyrect decoding paths against known-good and boundary-case tiles.

Typical attack path

  1. Attacker advertises or tricks user into connecting to a malicious VNC endpoint
  2. Client establishes VNC session and requests screen updates
  3. Server responds with RRE, hextile, or copyrect tiles containing malicious src coordinates
  4. Client library performs unchecked memory copy/write leading to code execution
  5. Attacker gains control of the client process

How to detect it

Review process execution logs and network connection records for VNC clients contacting unknown or newly observed servers; inspect core dumps or crash reports containing tile-decoding stack frames for signs of memory corruption.

What your security team should do

  • Immediately inventory all systems using gtk-vnc and schedule upgrades to 0.7.0+
  • Block or monitor outbound VNC connections to untrusted endpoints until patches are applied
  • Add gtk-vnc version checks to software bill-of-materials and CI pipelines

The record

gtk-vnc before 0.7.0 does not properly check boundaries of subrectangle-containing tiles, which allows remote servers to execute arbitrary code via the src x, y coordinates in a crafted (1) rre, (2) hextile, or (3) copyrect tile.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 gtk-vnc 0 0.6.0-3
Debian:12 gtk-vnc 0 0.6.0-3
Debian:13 gtk-vnc 0 0.6.0-3
Debian:7 gtk-vnc 0 0.5.0-3.1+deb7u1
Mageia:5 gtk-vnc 0 0.5.3-6.1.mga5
Red Hat:enterprise_linux:7::client gtk-vnc 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::client gtk-vnc-debuginfo 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::client gtk-vnc-devel 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::client gtk-vnc-python 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::client gtk-vnc2 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::client gtk-vnc2-devel 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::client gvnc 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::client gvnc-devel 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::client gvnc-tools 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::client gvncpulse 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::client gvncpulse-devel 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::server gtk-vnc 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::server gtk-vnc-debuginfo 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::server gtk-vnc-devel 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::server gtk-vnc-python 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::server gtk-vnc2 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::server gtk-vnc2-devel 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::server gvnc 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::server gvnc-devel 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::server gvnc-tools 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::server gvncpulse 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::server gvncpulse-devel 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::workstation gtk-vnc 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::workstation gtk-vnc-debuginfo 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::workstation gtk-vnc-devel 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::workstation gtk-vnc-python 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::workstation gtk-vnc2 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::workstation gtk-vnc2-devel 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::workstation gvnc 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::workstation gvnc-devel 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::workstation gvnc-tools 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::workstation gvncpulse 0 0:0.7.0-2.el7
Red Hat:enterprise_linux:7::workstation gvncpulse-devel 0 0:0.7.0-2.el7
SUSE:HPE Helion OpenStack 8 gtk-vnc 0 0.6.0-11.3.1
SUSE:HPE Helion OpenStack 8 gtk-vnc2 0 0.6.0-11.3.1
SUSE:Linux Enterprise Server 12 SP2-BCL gtk-vnc 0 0.6.0-11.3.1
SUSE:Linux Enterprise Server 12 SP2-BCL gtk-vnc2 0 0.6.0-11.3.1
SUSE:Linux Enterprise Server 12 SP3-BCL gtk-vnc 0 0.6.0-11.3.1
SUSE:Linux Enterprise Server 12 SP3-BCL gtk-vnc2 0 0.6.0-11.3.1
SUSE:Linux Enterprise Server 12 SP3-LTSS gtk-vnc 0 0.6.0-11.3.1
SUSE:Linux Enterprise Server 12 SP3-LTSS gtk-vnc2 0 0.6.0-11.3.1
SUSE:Linux Enterprise Server 12 SP4-LTSS gtk-vnc 0 0.6.0-11.3.1
SUSE:Linux Enterprise Server 12 SP4-LTSS gtk-vnc2 0 0.6.0-11.3.1
SUSE:Linux Enterprise Server 12 SP5 gtk-vnc 0 0.6.0-11.3.1
SUSE:Linux Enterprise Server 12 SP5 gtk-vnc2 0 0.6.0-11.3.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP3 gtk-vnc 0 0.6.0-11.3.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP3 gtk-vnc2 0 0.6.0-11.3.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP4 gtk-vnc 0 0.6.0-11.3.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP4 gtk-vnc2 0 0.6.0-11.3.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 gtk-vnc 0 0.6.0-11.3.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 gtk-vnc2 0 0.6.0-11.3.1
SUSE:Linux Enterprise Software Development Kit 12 SP5 gtk-vnc 0 0.6.0-11.3.1
SUSE:Linux Enterprise Software Development Kit 12 SP5 gtk-vnc2 0 0.6.0-11.3.1
SUSE:Linux Enterprise Workstation Extension 12 SP5 gtk-vnc 0 0.6.0-11.3.1
SUSE:OpenStack Cloud 8 gtk-vnc 0 0.6.0-11.3.1
SUSE:OpenStack Cloud 8 gtk-vnc2 0 0.6.0-11.3.1
SUSE:OpenStack Cloud 9 gtk-vnc 0 0.6.0-11.3.1
SUSE:OpenStack Cloud 9 gtk-vnc2 0 0.6.0-11.3.1
SUSE:OpenStack Cloud Crowbar 8 gtk-vnc 0 0.6.0-11.3.1
SUSE:OpenStack Cloud Crowbar 8 gtk-vnc2 0 0.6.0-11.3.1
SUSE:OpenStack Cloud Crowbar 9 gtk-vnc 0 0.6.0-11.3.1
SUSE:OpenStack Cloud Crowbar 9 gtk-vnc2 0 0.6.0-11.3.1
Ubuntu:14.04:LTS gtk-vnc 0 0.5.3-0ubuntu2.1
Ubuntu:16.04:LTS gtk-vnc 0 0.5.3-1.3ubuntu2.1
openSUSE:Tumbleweed gtk-vnc 0 1.2.0-1.4

Related vulnerabilities