Bug 19482 - freerdp new security issues CVE-2013-4118 and CVE-2013-4119
Summary: freerdp new security issues CVE-2013-4118 and CVE-2013-4119
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Security (show other bugs)
Version: 5
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact: Sec team
URL: http://lwn.net/Vulnerabilities/702121/
Whiteboard: MGA5-64-OK
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2016-09-28 22:27 CEST by David Walser
Modified: 2016-10-04 23:21 CEST (History)
4 users (show)

See Also:
Source RPM: freerdp-1.0.2-5.mga5.src.rpm
CVE:
Status comment:


Attachments

Description David Walser 2016-09-28 22:27:22 CEST
openSUSE has issued an advisory on September 27:
https://lists.opensuse.org/opensuse-updates/2016-09/msg00101.html

We already fixed CVE-2014-0791, but their bug also mentions CVE-2013-4119, and has links to upstream commits to fix that and CVE-2013-4118.  Part of the CVE-2013-4119 patch applies to our Mageia 5 sources too, so I imagine that's also relevant for us.

Both of these fixes should already be in the version in Cauldron.
Comment 1 David GEIGER 2016-09-29 09:36:52 CEST
Patch for CVE-2013-4118 applies after a rediff:

https://github.com/FreeRDP/FreeRDP/commit/7d58aac24fe20ffaad7bd9b40c9ddf457c1b06e7


But patch for CVE-2013-4119 does not applied properly, there is just one line that can be applied, so for me this one is not necessary:

https://github.com/FreeRDP/FreeRDP/commit/0773bb9303d24473fe1185d85a424dfe159aff53
Comment 2 David Walser 2016-09-29 16:14:16 CEST
Indeed it is only one line, the first instance of "transport->credssp = NULL;" in transport_connect_nla in transport.c, but it could be that that line should still be added.
Comment 4 David GEIGER 2016-09-29 17:16:09 CEST
s/rebase patche/rebased patch/
Comment 5 David Walser 2016-09-29 17:24:44 CEST
FreeRDP 1.0.2 uses "false" instead of "FALSE"
Comment 6 David GEIGER 2016-09-29 17:41:49 CEST
Indeed! pfff I'm really stupid :)

Thanks David!
Comment 7 David GEIGER 2016-09-30 11:37:08 CEST
Done for mga5!
Comment 8 David Walser 2016-09-30 11:45:44 CEST
Thanks David!

Advisory:
========================

Updated freerdp packages fix security vulnerabilities:

FreeRDP could crash due to a NULL or invalid pointer (CVE-2013-4118,
CVE-2013-4119).

References:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-4118
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-4119
https://lists.opensuse.org/opensuse-updates/2016-09/msg00101.html
========================

Updated packages in core/updates_testing:
========================
freerdp-1.0.2-5.1.mga5
libfreerdp1-1.0.2-5.1.mga5
libfreerdp-devel-1.0.2-5.1.mga5

from freerdp-1.0.2-5.1.mga5.src.rpm

CC: (none) => geiger.david68210
Assignee: geiger.david68210 => qa-bugs

Comment 9 Len Lawrence 2016-10-03 19:52:22 CEST
Assessing this on x86_64 real hardware.

CC: (none) => tarazed25

Comment 10 Len Lawrence 2016-10-03 22:24:04 CEST
Looks like a dud.  Spent half the evening trying to figure out how to set up a server-client relationship before realising that when it says client it means client only.  In the documentation xrdp is recommended for the server end but unfortunately that only exists in Cauldron.
Comment 11 David Walser 2016-10-03 22:52:41 CEST
You can build xrdp on mga5 (that's where I did originally), or you can use it to connect to a Windows machine if you have access to one.
Comment 12 Len Lawrence 2016-10-03 23:03:53 CEST
s/only exists/exists only/

Nope, never ever run Windows.  And I know I have done local builds but....
OK.  I'll see what I can do.  Thanks.
Comment 13 Len Lawrence 2016-10-03 23:57:28 CEST
Sorry to be a pest David; not getting very far with the downloading:

$ mgarepo co -d 5 xrdp
svn: E170000: URL 'svn://svn.mageia.org/svn/packages/updates/5/xrdp/current' doesn't exist

The /5/ is wrong so how to address cauldron?  I tried '-d 6' and '-d cauldron' without success, not actually knowing what -d does, just guessing at "distribution".  /etc/mgarepo.conf defaults to cauldron everywhere.
$ mgarepo co -d 6 xrdp
Using the svn mirror.
To be able to commit changes, use 'mgarepo switch' first.
svn: E170000: URL 'svn://svn.mageia.org/svn/packages/updates/6/xrdp/current' doesn't exist
Comment 14 David Walser 2016-10-03 23:58:46 CEST
Just drop the -d 5 options
Comment 15 David Walser 2016-10-03 23:59:01 CEST
Just drop the -d 5 options
Comment 16 Len Lawrence 2016-10-04 02:59:14 CEST
Of course.  That worked.  What a dumbo! (typo xrpd)
Let's start again.

Built xrdp from Cauldron.

$ magrepo co xrdp
(The earlier failure was caused by a typo - xrpd)

The local build succeeded but the installation required tigervnc as well.
Started the xrdp service on the target machine, vega.
$ sudo systemctl start xrdp.service
[lcl@vega xrdp]$ sudo systemctl status xrdp.service
â xrdp.service - xrdp daemon
   Loaded: loaded (/usr/lib/systemd/system/xrdp.service; enabled)
   Active: active (running) since Tue 2016-10-04 00:42:03 BST; 10s ago
 Main PID: 24833 (xrdp)
   CGroup: /system.slice/xrdp.service
           ââ24833 /usr/sbin/xrdp --nodaemon
Comment 17 Len Lawrence 2016-10-04 03:42:44 CEST
$ xfreerdp -T "vega central" -g 1280x1024 vega
connected to vega:3389
unknown capability type 6
incorrect offset, type:0x06 actual:4 expected:5
incorrect offset, type:0x06 actual:4 expected:5
Failed to check FreeRDP file descriptor

In spite of those messages the login window appeared and allowed remote login to user lcl.  This created the desktop window with dimensions 1920x1080 (!).  The DE defaulted to KDE with a GNOME terminal.  Mate was running on the host.  Simple graphical applications worked fine, called from the command line (wv and calco, homespun ruby graphical interfaces, one showing the local weather) or the system menus (konsole and imageviewer).  Images were displayed properly, with very little delay (Gigabit router and ethernet connections). 
$ who
This listed pts/0 to pts/5, all terminals running on the remote host with display :0 specified.  pts/6 to pts/8 represented the "virtual" desktop and the terminal, listed against display :10.0.  At some point the screensaver kicked in, the default rather than the one actually running on the remote host.

So everything looked good, more or less.

Moved to a wireless laptop and installed and updated freerdp.
$ xfreerdp -T "vega central" -g 800x640 vega
This showed the login window.  Logged in remotely as lcl.
The KDE desktop appeared at the correct dimensions with a GNOME terminal.  Ran a few tests as before and everything looked to be working.  the who command registered the six terminals already running on the remote host and two for the freerdp system.

From a functional point of view these updates are good and can be pushed.  No real 32bit hardware here so I am validating them.
Len Lawrence 2016-10-04 03:43:44 CEST

Keywords: (none) => validated_update
Whiteboard: (none) => MGA5-64-OK
CC: (none) => sysadmin-bugs

Comment 18 Mageia Robot 2016-10-04 09:44:49 CEST
An update for this issue has been pushed to the Mageia Updates repository.

http://advisories.mageia.org/MGASA-2016-0331.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 19 David Walser 2016-10-04 18:43:27 CEST
LWN reference for CVE-2013-4119:
http://lwn.net/Vulnerabilities/702552/
Comment 20 Nicolas Lécureuil 2016-10-04 23:16:29 CEST
added.

CC: (none) => mageia

Comment 21 David Walser 2016-10-04 23:21:23 CEST
(In reply to Nicolas Lécureuil from comment #20)
> added.

The LWN references are just info for the bugs.  We don't use these for our advisory references.

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