Bug 1546858 (CVE-2018-7225) - CVE-2018-7225 libvncserver: Improper input sanitization in rfbProcessClientNormalMessage in rfbserver.c
Summary: CVE-2018-7225 libvncserver: Improper input sanitization in rfbProcessClientNo...
Status: CLOSED ERRATA
Alias: CVE-2018-7225
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard: impact=moderate,public=20180218,repor...
Keywords: Security
Depends On: 1546859 1546860 1548440 1548441
Blocks: 1546862
TreeView+ depends on / blocked
 
Reported: 2018-02-19 20:09 UTC by Laura Pardo
Modified: 2019-06-08 22:41 UTC (History)
3 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2018-04-11 09:31:21 UTC


Attachments (Terms of Use)
Proposed fix (2.71 KB, patch)
2018-02-26 13:39 UTC, Petr Pisar
no flags Details | Diff
Proposed fix to mitigate excessive memory use (1.70 KB, patch)
2018-03-06 12:17 UTC, Petr Pisar
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Github LibVNC libvncserver issues 218 None None None 2018-02-26 13:36 UTC
Red Hat Product Errata RHSA-2018:1055 None None None 2018-04-10 09:10 UTC

Description Laura Pardo 2018-02-19 20:09:31 UTC
An issue was discovered in LibVNCServer through 0.9.11. rfbProcessClientNormalMessage() in rfbserver.c does not sanitize msg.cct.length, leading to access to uninitialized and potentially sensitive data or possibly unspecified other impact (e.g., an integer overflow) via specially crafted VNC packets.


References:
https://github.com/LibVNC/libvncserver/issues/218
http://www.openwall.com/lists/oss-security/2018/02/18/1

Comment 1 Laura Pardo 2018-02-19 20:10:00 UTC
Created libvncserver tracking bugs for this issue:

Affects: epel-7 [bug 1546859]
Affects: fedora-all [bug 1546860]

Comment 4 Petr Pisar 2018-02-26 13:39 UTC
Created attachment 1400842 [details]
Proposed fix

This prevents from the integer overflow.

However, it does not impose any length limit to prevent from allocating a lot of memory as I don't know what the sane limit should be.

Comment 5 Petr Pisar 2018-03-06 12:17 UTC
Created attachment 1404775 [details]
Proposed fix to mitigate excessive memory use

The original patch fixes only the use of noninicialized memory. This second patch prevents from a DoS when a client request a valid but really big buffer size (2 GB) by limiting the acceptable size to 1 MB.

Comment 7 Fedora Update System 2018-03-27 20:13:05 UTC
libvncserver-0.9.11-5.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2018-03-30 13:16:55 UTC
libvncserver-0.9.11-6.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2018-04-03 14:24:36 UTC
libvncserver-0.9.11-3.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 errata-xmlrpc 2018-04-10 09:10:12 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2018:1055 https://access.redhat.com/errata/RHSA-2018:1055


Note You need to log in before you can comment on or make changes to this bug.